Actually remove all of SpcSpOpusInfo.

So we had SpcSpOpusInfo until c0c4da6c67, when we realized MS no longer
includes those fields in their data, and removed them.

Except it didn't remove the data from the OID table or the enum from the
list, so all the OIDs after that were off by one.

Probably this confirms that a lot of things aren't checking those
completely senseless bits of the Authenticated Attributes.  I can't
decide if that's terrifying or not.

Signed-off-by: Peter Jones <pjones@redhat.com>
Modern signtool.exe doesn't include L"<<<Obsolete>>>" in SpcLink.

Signed-off-by: Peter Jones <pjones@redhat.com>
fuzzsocket is chaff; remove the make bits.

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

Signed-off-by: Peter Jones <pjones@redhat.com>
Don't set SO_PASSCRED.

It would appear that on recent kernels, setting SO_PASSCRED means you
always get SCM_CREDENTIALS control messages back instead of what
sendmsg() sent you, and SCM_RIGHTS works just fine without it.

Signed-off-by: Peter Jones <pjones@redhat.com>
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>
Ignore .strace files

Signed-off-by: Peter Jones <pjones@redhat.com>
Add the ability to query if a key by name for locked/unlocked status.

This should fix https://github.com/vathpela/pesign/issues/10

Signed-off-by: Peter Jones <pjones@redhat.com>
Make it so we have versions on individual commands.

This should mean We can add new commands (and additively replace old
ones) without reving the API version in the future.

Signed-off-by: Peter Jones <pjones@redhat.com>
authvar: fill some baisc functions

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: generate and write the EFI AUTH variable

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: collect everything in buffer and write it later

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: parse the timestamp string

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: adjust timestamp for append

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: modify the content of SignedData for authvar

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: fix USC2 conversion and the length of the header

Also truncate the export file.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
authvar: sign the right content

We don't have to calculate the digest first.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>