summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/pkcs7.asn1
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-07-20 21:16:33 +0100
committerDavid Howells <dhowells@redhat.com>2015-08-12 17:01:01 +0100
commit60d65cacd7c2d84a6dcad69bcb57bbf0220c8643 (patch)
tree636bda3cc9024a04edf1ae5780266fde743e7b1e /crypto/asymmetric_keys/pkcs7.asn1
parenta4c6e57f4f5fa65cbdb8cc1c14ff5ca7c56766c3 (diff)
downloadop-kernel-dev-60d65cacd7c2d84a6dcad69bcb57bbf0220c8643.zip
op-kernel-dev-60d65cacd7c2d84a6dcad69bcb57bbf0220c8643.tar.gz
PKCS#7: Support CMS messages also [RFC5652]
Since CMS is an evolution of PKCS#7, with much of the ASN.1 being compatible, add support for CMS signed-data messages also [RFC5652 sec 5]. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-By: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'crypto/asymmetric_keys/pkcs7.asn1')
-rw-r--r--crypto/asymmetric_keys/pkcs7.asn110
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/pkcs7.asn1 b/crypto/asymmetric_keys/pkcs7.asn1
index 0550443..6bf8ff4 100644
--- a/crypto/asymmetric_keys/pkcs7.asn1
+++ b/crypto/asymmetric_keys/pkcs7.asn1
@@ -69,7 +69,7 @@ SignerInfos ::= CHOICE {
SignerInfo ::= SEQUENCE {
version INTEGER ({ pkcs7_note_signerinfo_version }),
- issuerAndSerialNumber IssuerAndSerialNumber,
+ sid SignerIdentifier, -- CMS variant, not PKCS#7
digestAlgorithm DigestAlgorithmIdentifier ({ pkcs7_sig_note_digest_algo }),
authenticatedAttributes CHOICE {
aaSet [0] IMPLICIT SetOfAuthenticatedAttribute
@@ -88,6 +88,12 @@ SignerInfo ::= SEQUENCE {
} OPTIONAL
} ({ pkcs7_note_signed_info })
+SignerIdentifier ::= CHOICE {
+ -- RFC5652 sec 5.3
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier
+}
+
IssuerAndSerialNumber ::= SEQUENCE {
issuer Name ({ pkcs7_sig_note_issuer }),
serialNumber CertificateSerialNumber ({ pkcs7_sig_note_serial })
@@ -95,6 +101,8 @@ IssuerAndSerialNumber ::= SEQUENCE {
CertificateSerialNumber ::= INTEGER
+SubjectKeyIdentifier ::= OCTET STRING ({ pkcs7_sig_note_skid })
+
SetOfAuthenticatedAttribute ::= SET OF AuthenticatedAttribute
AuthenticatedAttribute ::= SEQUENCE {
OpenPOWER on IntegriCloud