Use uuid_generate_random() by default when generating cert's serial numbers.

Signed-off-by: Peter Jones <pjones@redhat.com>
Test for the right sentinal value from strtoul().

Nalin noticed that I was testing strtoull()'s return constant instead.

Signed-off-by: Peter Jones <pjones@redhat.com>
Don't do uuid_clear() twice.

Just extra code for no reason.

Signed-off-by: Peter Jones <pjones@redhat.com>
Actually correctly zero-pad serial numbers with the sign bit set.

Our Lady of Misplaced Pad Bytes was not kind to me yesterday.

This also allows manually input serial numbers to be 64-bit values.

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

Signed-off-by: Peter Jones <pjones@redhat.com>
Make PE-related things be in their own namespace.

Signed-off-by: Peter Jones <pjones@redhat.com>
Move some pe-specific stuff out of actions.c .

actions.c probably should entirely go away, but that's not today's
project.

Signed-off-by: Peter Jones <pjones@redhat.com>
Preliminary move to make max signatures a policy question.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make pe_memory() real.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make our input file get mmaped in pesign instead of libdpe.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix a leak and a bad error pathway valgrind found.

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

Signed-off-by: Peter Jones <pjones@redhat.com>
Rename dprintf since that's a libc symbol name these days.

Signed-off-by: Peter Jones <pjones@redhat.com>
Add some debugging prints.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make all the input/output setup code generic.

Signed-off-by: Peter Jones <pjones@redhat.com>
Simplify error reporting using err.h

Signed-off-by: Peter Jones <pjones@redhat.com>
Start moving pe-specific functions to their own private space.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make check_pe_signature_space() generic.

Signed-off-by: Peter Jones <pjones@redhat.com>
Use our helper functions more.

Signed-off-by: Peter Jones <pjones@redhat.com>
Use a fake pesign_context in the daemon.

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