aboutsummaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/pkcs7_parser.h
diff options
context:
space:
mode:
authorDavid Howells2016-04-06 16:13:33 +0100
committerDavid Howells2016-04-06 16:13:33 +0100
commit566a117a8b24e1ae2dfa817cf0c9eec092c783b5 (patch)
treeb2ebc4f27309656167ef03668f543d2494c994e7 /crypto/asymmetric_keys/pkcs7_parser.h
parent77d0910d153a7946df17cc15d3f423e534345f65 (diff)
PKCS#7: Make the signature a pointer rather than embedding it
Point to the public_key_signature struct from the pkcs7_signed_info struct rather than embedding it. This makes the code consistent with the X.509 signature handling and makes it possible to have a common cleanup function. We also save a copy of the digest in the signature without sharing the memory with the crypto layer metadata. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/pkcs7_parser.h')
-rw-r--r--crypto/asymmetric_keys/pkcs7_parser.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/asymmetric_keys/pkcs7_parser.h b/crypto/asymmetric_keys/pkcs7_parser.h
index a66b19ebcf47..d5eec31e95b6 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.h
+++ b/crypto/asymmetric_keys/pkcs7_parser.h
@@ -41,19 +41,17 @@ struct pkcs7_signed_info {
#define sinfo_has_ms_statement_type 5
time64_t signing_time;
- /* Issuing cert serial number and issuer's name [PKCS#7 or CMS ver 1]
- * or issuing cert's SKID [CMS ver 3].
- */
- struct asymmetric_key_id *signing_cert_id;
-
/* Message signature.
*
* This contains the generated digest of _either_ the Content Data or
* the Authenticated Attributes [RFC2315 9.3]. If the latter, one of
* the attributes contains the digest of the the Content Data within
* it.
+ *
+ * THis also contains the issuing cert serial number and issuer's name
+ * [PKCS#7 or CMS ver 1] or issuing cert's SKID [CMS ver 3].
*/
- struct public_key_signature sig;
+ struct public_key_signature *sig;
};
struct pkcs7_message {