aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/pkcs7.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-07-20 21:16:26 +0100
committerDavid Howells <dhowells@redhat.com>2015-08-07 16:26:13 +0100
commit4ebdb76f7da662346267384440492bb9d87c2aa3 (patch)
tree53b863a630359237fc6dfdfc051a2aebbac5f7d1 /include/crypto/pkcs7.h
parentX.509: Support X.509 lookup by Issuer+Serial form AuthorityKeyIdentifier (diff)
downloadlinux-dev-4ebdb76f7da662346267384440492bb9d87c2aa3.tar.xz
linux-dev-4ebdb76f7da662346267384440492bb9d87c2aa3.zip
PKCS#7: Allow detached data to be supplied for signature checking purposes
It is possible for a PKCS#7 message to have detached data. However, to verify the signatures on a PKCS#7 message, we have to be able to digest the data. Provide a function to supply that data. An error is given if the PKCS#7 message included embedded data. This is used in a subsequent patch to supply the data to module signing where the signature is in the form of a PKCS#7 message with detached data, whereby the detached data is the module content that is signed. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to '')
-rw-r--r--include/crypto/pkcs7.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/pkcs7.h b/include/crypto/pkcs7.h
index 691c79172a26..e235ab4957ee 100644
--- a/include/crypto/pkcs7.h
+++ b/include/crypto/pkcs7.h
@@ -34,3 +34,6 @@ extern int pkcs7_validate_trust(struct pkcs7_message *pkcs7,
* pkcs7_verify.c
*/
extern int pkcs7_verify(struct pkcs7_message *pkcs7);
+
+extern int pkcs7_supply_detached_data(struct pkcs7_message *pkcs7,
+ const void *data, size_t datalen);