Pad the file to be 16-byte aligned, instead of 8-byte

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Add an option, -padding, for -h to pad signatures

We are using "-h" to check the integrity of the file after inserting
a raw signature. Add this option to make the digests consistent.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Audit for wrong alignment - 8 bytes is correct, 16 is not.

Seems we had that mistake twice.  Woops.

Signed-off-by: Peter Jones <pjones@redhat.com>
Bump version to 0.104

TODO for actual 1.0 release:
1) make peverify work
2) make "make test" do something reasonable with pesign and peverify

Signed-off-by: Peter Jones <pjones@redhat.com>
pesign: Ubuntu build fixes

() pkgconfig already adds the nss and nspr include dirs
to the include paths, and on Ubuntu they are not in
nss3/ or nspr4/ subdirectories of /usr/include; they are
in nss/ and nspr/ instead. Rely on pkgconfig to do the
right thing instead of hard-coding dirs in the source.

() fix link error related to missing pthread symbols

Build-tested on Ubuntu 13.04 and Fedora 18.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Do a better job of checking input for --value and --valuefile

Signed-off-by: Peter Jones <pjones@redhat.com>
authvar: make the flag list somewhat less dumb

Signed-off-by: Peter Jones <pjones@redhat.com>
Tell which terminal we couldn't open when getting password fails.

Signed-off-by: Peter Jones <pjones@redhat.com>
Ignore 0-sized messages; they're hangups.

Signed-off-by: Peter Jones <pjones@redhat.com>
Be more picky about message sizes from the client.

Don't allow a message smaller than our header at all.

Signed-off-by: Peter Jones <pjones@redhat.com>
[client] Don't open the socket for the server unless we'll use it.

Signed-off-by: Peter Jones <pjones@redhat.com>
[daemon] Handle POLLHUP better.

Be sure not to walk off the end of the list on POLLHUP.

Signed-off-by: Peter Jones <pjones@redhat.com>
Update to version 0.105

Signed-off-by: Peter Jones <pjones@redhat.com>
Use the backup cms logger in set_up_socket()

set_up_socket is called from daemonize(), and that means it can't use
the cms set up for the daemon to do logging.  So use the other one.

Signed-off-by: Peter Jones <pjones@redhat.com>
Unlink the old socket path before we bind a new one.

Just so we know we're starting fresh.

Signed-off-by: Peter Jones <pjones@redhat.com>
Bump version to 0.106

Signed-off-by: Peter Jones <pjones@redhat.com>
Revert "Unlink the old socket path before we bind a new one."

We shouldn't need to unlink the socket, and it wasn't really the bug we
were hitting, and this screws up any setfacl/chmod that's been done.

This reverts commit efb490d8803cf510918c79dfbbb08f44798a4a77.
Be picky about having a signer's der data, not just an empty reference.

When NSS sees an issuer cert it doesn't know about, it builds an entry
for it in its internal cache, but the DER blob isn't populated unless it
sees an actual copy of the cert.  So we shouldn't try to emit that blob
in that case.

Signed-off-by: Peter Jones <pjones@redhat.com>
Add RHEL bits to %%pesign macro.

Signed-off-by: Peter Jones <pjones@redhat.com>
Rework certdb's add_db_cert and check_db functions.

Signed-off-by: Peter Jones <pjones@redhat.com>