Allocate cms_context for peverify_context

This avoids the crash while freeing cms_context.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Calculate the dbsize to avoid the infinite loop

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Update the pathes of db, MokListRT, and dbx

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Skip the first 4 bytes in the efi variables

The first 4 bytes store the attributes of the efi variable.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Match the hashes in the db list

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Verify the signature with the certs in the dblist

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Verify the PE image with a certificate

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
It's peverify, not pesign :)

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

Signed-off-by: Peter Jones <pjones@redhat.com>
Add some things to the TODO list.

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