summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/verify_pefile.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-06 16:14:24 +0100
committerDavid Howells <dhowells@redhat.com>2016-04-06 16:14:24 +0100
commitb8cc7ddcdc1f06b141f4f0382e0d1bb5f67c8d3b (patch)
tree603582d4ed6cc6d4b76fdb67684f07c8a83bd9a2 /crypto/asymmetric_keys/verify_pefile.h
parent42129631f2f3c4c9aa8d81006b51aef9c398d64e (diff)
downloadlinux-crypto-b8cc7ddcdc1f06b141f4f0382e0d1bb5f67c8d3b.tar.gz
linux-crypto-b8cc7ddcdc1f06b141f4f0382e0d1bb5f67c8d3b.zip
KEYS: Generalise system_verify_data() to provide access to internal content
Generalise system_verify_data() to provide access to internal content through a callback. This allows all the PKCS#7 stuff to be hidden inside this function and removed from the PE file parser and the PKCS#7 test key. If external content is not required, NULL should be passed as data to the function. If the callback is not required, that can be set to NULL. The function is now called verify_pkcs7_signature() to contrast with verify_pefile_signature() and the definitions of both have been moved into linux/verification.h along with the key_being_used_for enum. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/verify_pefile.h')
-rw-r--r--crypto/asymmetric_keys/verify_pefile.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/asymmetric_keys/verify_pefile.h b/crypto/asymmetric_keys/verify_pefile.h
index a133eb81..cd4d2093 100644
--- a/crypto/asymmetric_keys/verify_pefile.h
+++ b/crypto/asymmetric_keys/verify_pefile.h
@@ -9,7 +9,6 @@
* 2 of the Licence, or (at your option) any later version.
*/
-#include <linux/verify_pefile.h>
#include <crypto/pkcs7.h>
#include <crypto/hash_info.h>
@@ -23,7 +22,6 @@ struct pefile_context {
unsigned sig_offset;
unsigned sig_len;
const struct section_header *secs;
- struct pkcs7_message *pkcs7;
/* PKCS#7 MS Individual Code Signing content */
const void *digest; /* Digest */
@@ -39,4 +37,5 @@ struct pefile_context {
/*
* mscode_parser.c
*/
-extern int mscode_parse(struct pefile_context *ctx);
+extern int mscode_parse(void *_ctx, const void *content_data, size_t data_len,
+ size_t asn1hdrlen);