143 lines · plain
1-- SPDX-License-Identifier: BSD-3-Clause2--3-- Copyright (C) 2009 IETF Trust and the persons identified as authors4-- of the code5--6-- https://www.rfc-editor.org/rfc/rfc5652#section-37 8PKCS7ContentInfo ::= SEQUENCE {9 contentType ContentType ({ pkcs7_check_content_type }),10 content [0] EXPLICIT SignedData OPTIONAL11}12 13ContentType ::= OBJECT IDENTIFIER ({ pkcs7_note_OID })14 15SignedData ::= SEQUENCE {16 version INTEGER ({ pkcs7_note_signeddata_version }),17 digestAlgorithms DigestAlgorithmIdentifiers,18 contentInfo ContentInfo ({ pkcs7_note_content }),19 certificates CHOICE {20 certSet [0] IMPLICIT ExtendedCertificatesAndCertificates,21 certSequence [2] IMPLICIT Certificates22 } OPTIONAL ({ pkcs7_note_certificate_list }),23 crls CHOICE {24 crlSet [1] IMPLICIT CertificateRevocationLists,25 crlSequence [3] IMPLICIT CRLSequence26 } OPTIONAL,27 signerInfos SignerInfos28}29 30ContentInfo ::= SEQUENCE {31 contentType ContentType ({ pkcs7_note_OID }),32 content [0] EXPLICIT Data OPTIONAL33}34 35Data ::= ANY ({ pkcs7_note_data })36 37DigestAlgorithmIdentifiers ::= CHOICE {38 daSet SET OF DigestAlgorithmIdentifier,39 daSequence SEQUENCE OF DigestAlgorithmIdentifier40}41 42DigestAlgorithmIdentifier ::= SEQUENCE {43 algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),44 parameters ANY OPTIONAL45}46 47--48-- Certificates and certificate lists49--50ExtendedCertificatesAndCertificates ::= SET OF ExtendedCertificateOrCertificate51 52ExtendedCertificateOrCertificate ::= CHOICE {53 certificate Certificate, -- X.50954 extendedCertificate [0] IMPLICIT ExtendedCertificate -- PKCS#655}56 57ExtendedCertificate ::= Certificate -- cheating58 59Certificates ::= SEQUENCE OF Certificate60 61CertificateRevocationLists ::= SET OF CertificateList62 63CertificateList ::= SEQUENCE OF Certificate -- This may be defined incorrectly64 65CRLSequence ::= SEQUENCE OF CertificateList66 67Certificate ::= ANY ({ pkcs7_extract_cert }) -- X.50968 69--70-- Signer information71--72SignerInfos ::= CHOICE {73 siSet SET OF SignerInfo,74 siSequence SEQUENCE OF SignerInfo75}76 77SignerInfo ::= SEQUENCE {78 version INTEGER ({ pkcs7_note_signerinfo_version }),79 sid SignerIdentifier, -- CMS variant, not PKCS#780 digestAlgorithm DigestAlgorithmIdentifier ({ pkcs7_sig_note_digest_algo }),81 authenticatedAttributes CHOICE {82 aaSet [0] IMPLICIT SetOfAuthenticatedAttribute83 ({ pkcs7_sig_note_set_of_authattrs }),84 aaSequence [2] EXPLICIT SEQUENCE OF AuthenticatedAttribute85 -- Explicit because easier to compute digest on86 -- sequence of attributes and then reuse encoded87 -- sequence in aaSequence.88 } OPTIONAL,89 digestEncryptionAlgorithm90 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 UnauthenticatedAttribute95 } OPTIONAL96} ({ pkcs7_note_signed_info })97 98SignerIdentifier ::= CHOICE {99 -- RFC5652 sec 5.3100 issuerAndSerialNumber IssuerAndSerialNumber,101 subjectKeyIdentifier [0] IMPLICIT SubjectKeyIdentifier102}103 104IssuerAndSerialNumber ::= SEQUENCE {105 issuer Name ({ pkcs7_sig_note_issuer }),106 serialNumber CertificateSerialNumber ({ pkcs7_sig_note_serial })107}108 109CertificateSerialNumber ::= INTEGER110 111SubjectKeyIdentifier ::= OCTET STRING ({ pkcs7_sig_note_skid })112 113SetOfAuthenticatedAttribute ::= SET OF AuthenticatedAttribute114 115AuthenticatedAttribute ::= SEQUENCE {116 type OBJECT IDENTIFIER ({ pkcs7_note_OID }),117 values SET OF ANY ({ pkcs7_sig_note_authenticated_attr })118}119 120UnauthenticatedAttribute ::= SEQUENCE {121 type OBJECT IDENTIFIER,122 values SET OF ANY123}124 125DigestEncryptionAlgorithmIdentifier ::= SEQUENCE {126 algorithm OBJECT IDENTIFIER ({ pkcs7_note_OID }),127 parameters ANY OPTIONAL128}129 130EncryptedDigest ::= OCTET STRING ({ pkcs7_sig_note_signature })131 132---133--- X.500 Name134---135Name ::= SEQUENCE OF RelativeDistinguishedName136 137RelativeDistinguishedName ::= SET OF AttributeValueAssertion138 139AttributeValueAssertion ::= SEQUENCE {140 attributeType OBJECT IDENTIFIER ({ pkcs7_note_OID }),141 attributeValue ANY142}143