^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) PKCS7ContentInfo ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) contentType ContentType ({ pkcs7_check_content_type }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) content [0] EXPLICIT SignedData OPTIONAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) ContentType ::= OBJECT IDENTIFIER ({ pkcs7_note_OID })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) SignedData ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) version INTEGER ({ pkcs7_note_signeddata_version }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) digestAlgorithms DigestAlgorithmIdentifiers,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) contentInfo ContentInfo ({ pkcs7_note_content }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) certificates CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) certSet [0] IMPLICIT ExtendedCertificatesAndCertificates,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) certSequence [2] IMPLICIT Certificates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) } OPTIONAL ({ pkcs7_note_certificate_list }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) crls CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) crlSet [1] IMPLICIT CertificateRevocationLists,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) crlSequence [3] IMPLICIT CRLSequence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) } OPTIONAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) signerInfos SignerInfos
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) ContentInfo ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) contentType ContentType ({ pkcs7_note_OID }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) content [0] EXPLICIT Data OPTIONAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) Data ::= ANY ({ pkcs7_note_data })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) DigestAlgorithmIdentifiers ::= CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) daSet SET OF DigestAlgorithmIdentifier,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) daSequence SEQUENCE OF DigestAlgorithmIdentifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) DigestAlgorithmIdentifier ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) parameters ANY OPTIONAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) --
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) -- Certificates and certificate lists
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) --
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) ExtendedCertificatesAndCertificates ::= SET OF ExtendedCertificateOrCertificate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) ExtendedCertificateOrCertificate ::= CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) certificate Certificate, -- X.509
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) extendedCertificate [0] IMPLICIT ExtendedCertificate -- PKCS#6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) ExtendedCertificate ::= Certificate -- cheating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Certificates ::= SEQUENCE OF Certificate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) CertificateRevocationLists ::= SET OF CertificateList
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) CertificateList ::= SEQUENCE OF Certificate -- This may be defined incorrectly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) CRLSequence ::= SEQUENCE OF CertificateList
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) Certificate ::= ANY ({ pkcs7_extract_cert }) -- X.509
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) --
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) -- Signer information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) --
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) SignerInfos ::= CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) siSet SET OF SignerInfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) siSequence SEQUENCE OF SignerInfo
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) SignerInfo ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) version INTEGER ({ pkcs7_note_signerinfo_version }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) sid SignerIdentifier, -- CMS variant, not PKCS#7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) digestAlgorithm DigestAlgorithmIdentifier ({ pkcs7_sig_note_digest_algo }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) authenticatedAttributes CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) aaSet [0] IMPLICIT SetOfAuthenticatedAttribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) ({ pkcs7_sig_note_set_of_authattrs }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) aaSequence [2] EXPLICIT SEQUENCE OF AuthenticatedAttribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) -- Explicit because easier to compute digest on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) -- sequence of attributes and then reuse encoded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) -- sequence in aaSequence.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) } OPTIONAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) digestEncryptionAlgorithm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) DigestEncryptionAlgorithmIdentifier ({ pkcs7_sig_note_pkey_algo }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) encryptedDigest EncryptedDigest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) unauthenticatedAttributes CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) uaSet [1] IMPLICIT SET OF UnauthenticatedAttribute,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) uaSequence [3] IMPLICIT SEQUENCE OF UnauthenticatedAttribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) } OPTIONAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) } ({ pkcs7_note_signed_info })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) SignerIdentifier ::= CHOICE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) -- RFC5652 sec 5.3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) issuerAndSerialNumber IssuerAndSerialNumber,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) IssuerAndSerialNumber ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) issuer Name ({ pkcs7_sig_note_issuer }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) serialNumber CertificateSerialNumber ({ pkcs7_sig_note_serial })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) CertificateSerialNumber ::= INTEGER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) SubjectKeyIdentifier ::= OCTET STRING ({ pkcs7_sig_note_skid })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) SetOfAuthenticatedAttribute ::= SET OF AuthenticatedAttribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) AuthenticatedAttribute ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) type OBJECT IDENTIFIER ({ pkcs7_note_OID }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) values SET OF ANY ({ pkcs7_sig_note_authenticated_attr })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) UnauthenticatedAttribute ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) type OBJECT IDENTIFIER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) values SET OF ANY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) DigestEncryptionAlgorithmIdentifier ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) parameters ANY OPTIONAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) EncryptedDigest ::= OCTET STRING ({ pkcs7_sig_note_signature })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) --- X.500 Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) Name ::= SEQUENCE OF RelativeDistinguishedName
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) RelativeDistinguishedName ::= SET OF AttributeValueAssertion
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) AttributeValueAssertion ::= SEQUENCE {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) attributeType OBJECT IDENTIFIER ({ pkcs7_note_OID }),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) attributeValue ANY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) }