1 -- SPDX-License-Identifier: BSD-3-Clause
3 -- Copyright (C) 2009 IETF Trust and the persons identified as authors
6 -- https://www.rfc-editor.org/rfc/rfc5652#section-3
8 PKCS7ContentInfo ::= SEQUENCE {
9 contentType ContentType ({ pkcs7_check_content_type }),
10 content [0] EXPLICIT SignedData OPTIONAL
13 ContentType ::= OBJECT IDENTIFIER ({ pkcs7_note_OID })
15 SignedData ::= SEQUENCE {
16 version INTEGER ({ pkcs7_note_signeddata_version }),
17 digestAlgorithms DigestAlgorithmIdentifiers,
18 contentInfo ContentInfo ({ pkcs7_note_content }),
20 certSet [0] IMPLICIT ExtendedCertificatesAndCertificates,
21 certSequence [2] IMPLICIT Certificates
22 } OPTIONAL ({ pkcs7_note_certificate_list }),
24 crlSet [1] IMPLICIT CertificateRevocationLists,
25 crlSequence [3] IMPLICIT CRLSequence
27 signerInfos SignerInfos
30 ContentInfo ::= SEQUENCE {
31 contentType ContentType ({ pkcs7_note_OID }),
32 content [0] EXPLICIT Data OPTIONAL
35 Data ::= ANY ({ pkcs7_note_data })
37 DigestAlgorithmIdentifiers ::= CHOICE {
38 daSet SET OF DigestAlgorithmIdentifier,
39 daSequence SEQUENCE OF DigestAlgorithmIdentifier
42 DigestAlgorithmIdentifier ::= SEQUENCE {
43 algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),
44 parameters ANY OPTIONAL
48 -- Certificates and certificate lists
50 ExtendedCertificatesAndCertificates ::= SET OF ExtendedCertificateOrCertificate
52 ExtendedCertificateOrCertificate ::= CHOICE {
53 certificate Certificate, -- X.509
54 extendedCertificate [0] IMPLICIT ExtendedCertificate -- PKCS#6
57 ExtendedCertificate ::= Certificate -- cheating
59 Certificates ::= SEQUENCE OF Certificate
61 CertificateRevocationLists ::= SET OF CertificateList
63 CertificateList ::= SEQUENCE OF Certificate -- This may be defined incorrectly
65 CRLSequence ::= SEQUENCE OF CertificateList
67 Certificate ::= ANY ({ pkcs7_extract_cert }) -- X.509
72 SignerInfos ::= CHOICE {
73 siSet SET OF SignerInfo,
74 siSequence SEQUENCE OF SignerInfo
77 SignerInfo ::= SEQUENCE {
78 version INTEGER ({ pkcs7_note_signerinfo_version }),
79 sid SignerIdentifier, -- CMS variant, not PKCS#7
80 digestAlgorithm DigestAlgorithmIdentifier ({ pkcs7_sig_note_digest_algo }),
81 authenticatedAttributes CHOICE {
82 aaSet [0] IMPLICIT SetOfAuthenticatedAttribute
83 ({ pkcs7_sig_note_set_of_authattrs }),
84 aaSequence [2] EXPLICIT SEQUENCE OF AuthenticatedAttribute
85 -- Explicit because easier to compute digest on
86 -- sequence of attributes and then reuse encoded
87 -- sequence in aaSequence.
89 digestEncryptionAlgorithm
90 DigestEncryptionAlgorithmIdentifier ({ pkcs7_sig_note_pkey_algo }),
91 encryptedDigest EncryptedDigest,
92 unauthenticatedAttributes CHOICE {
93 uaSet [1] IMPLICIT SET OF UnauthenticatedAttribute,
94 uaSequence [3] IMPLICIT SEQUENCE OF UnauthenticatedAttribute
96 } ({ pkcs7_note_signed_info })
98 SignerIdentifier ::= CHOICE {
100 issuerAndSerialNumber IssuerAndSerialNumber,
101 subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier
104 IssuerAndSerialNumber ::= SEQUENCE {
105 issuer Name ({ pkcs7_sig_note_issuer }),
106 serialNumber CertificateSerialNumber ({ pkcs7_sig_note_serial })
109 CertificateSerialNumber ::= INTEGER
111 SubjectKeyIdentifier ::= OCTET STRING ({ pkcs7_sig_note_skid })
113 SetOfAuthenticatedAttribute ::= SET OF AuthenticatedAttribute
115 AuthenticatedAttribute ::= SEQUENCE {
116 type OBJECT IDENTIFIER ({ pkcs7_note_OID }),
117 values SET OF ANY ({ pkcs7_sig_note_authenticated_attr })
120 UnauthenticatedAttribute ::= SEQUENCE {
121 type OBJECT IDENTIFIER,
125 DigestEncryptionAlgorithmIdentifier ::= SEQUENCE {
126 algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),
127 parameters ANY OPTIONAL
130 EncryptedDigest ::= OCTET STRING ({ pkcs7_sig_note_signature })
135 Name ::= SEQUENCE OF RelativeDistinguishedName
137 RelativeDistinguishedName ::= SET OF AttributeValueAssertion
139 AttributeValueAssertion ::= SEQUENCE {
140 attributeType OBJECT IDENTIFIER ({ pkcs7_note_OID }),