summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/verify_pefile.c
Commit message (Collapse)AuthorAgeFilesLines
* pefile: Validate PKCS#7 trust chainDavid Howells2014-07-091-1/+1
| | | | | | | Validate the PKCS#7 trust chain against the contents of the system keyring. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
* pefile: Digest the PE binary and compare to the PKCS#7 dataDavid Howells2014-07-091-0/+197
| | | | | | | | | | Digest the signed parts of the PE binary, canonicalising the section table before we need it, and then compare the the resulting digest to the one in the PKCS#7 signed content. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org>
* pefile: Parse the "Microsoft individual code signing" data blobDavid Howells2014-07-091-0/+7
| | | | | | | | | | | The PKCS#7 certificate should contain a "Microsoft individual code signing" data blob as its signed content. This blob contains a digest of the signed content of the PE binary and the OID of the digest algorithm used (typically SHA256). Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org>
* pefile: Parse the presumed PKCS#7 content of the certificate blobDavid Howells2014-07-091-1/+20
| | | | | | | | Parse the content of the certificate blob, presuming it to be PKCS#7 format. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org>
* pefile: Strip the wrapper off of the cert data blockDavid Howells2014-07-091-0/+71
| | | | | | | | | | The certificate data block in a PE binary has a wrapper around the PKCS#7 signature we actually want to get at. Strip this off and check that we've got something that appears to be a PKCS#7 signature. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org>
* pefile: Parse a PE binary to find a key and a signature contained thereinDavid Howells2014-07-091-0/+163
Parse a PE binary to find a key and a signature contained therein. Later patches will check the signature and add the key if the signature checks out. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org>