4 CMS DEFINITIONS ::= BEGIN
6 IMPORTS CertificateSerialNumber, AlgorithmIdentifier, Name,
7 Attribute, Certificate, SubjectKeyIdentifier FROM rfc2459
10 id-pkcs7 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
11 us(840) rsadsi(113549) pkcs(1) pkcs7(7) }
13 id-pkcs7-data OBJECT IDENTIFIER ::= { id-pkcs7 1 }
14 id-pkcs7-signedData OBJECT IDENTIFIER ::= { id-pkcs7 2 }
15 id-pkcs7-envelopedData OBJECT IDENTIFIER ::= { id-pkcs7 3 }
16 id-pkcs7-signedAndEnvelopedData OBJECT IDENTIFIER ::= { id-pkcs7 4 }
17 id-pkcs7-digestedData OBJECT IDENTIFIER ::= { id-pkcs7 5 }
18 id-pkcs7-encryptedData OBJECT IDENTIFIER ::= { id-pkcs7 6 }
20 CMSVersion ::= INTEGER {
28 DigestAlgorithmIdentifier ::= AlgorithmIdentifier
29 DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
30 SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
32 ContentType ::= OBJECT IDENTIFIER
33 MessageDigest ::= OCTET STRING
35 ContentInfo ::= SEQUENCE {
36 contentType ContentType,
37 content [0] EXPLICIT HEIM_ANY OPTIONAL -- DEFINED BY contentType
40 EncapsulatedContentInfo ::= SEQUENCE {
41 eContentType ContentType,
42 eContent [0] EXPLICIT OCTET STRING OPTIONAL
45 CertificateSet ::= SET OF HEIM_ANY
47 CertificateList ::= Certificate
49 CertificateRevocationLists ::= SET OF CertificateList
51 IssuerAndSerialNumber ::= SEQUENCE {
53 serialNumber CertificateSerialNumber
56 -- RecipientIdentifier is same as SignerIdentifier,
57 -- lets glue them togheter and save some bytes and share code for them
59 CMSIdentifier ::= CHOICE {
60 issuerAndSerialNumber IssuerAndSerialNumber,
61 subjectKeyIdentifier [0] SubjectKeyIdentifier
64 SignerIdentifier ::= CMSIdentifier
65 RecipientIdentifier ::= CMSIdentifier
67 --- CMSAttributes are the combined UnsignedAttributes and SignedAttributes
68 --- to store space and share code
70 CMSAttributes ::= SET OF Attribute -- SIZE (1..MAX)
72 SignatureValue ::= OCTET STRING
74 SignerInfo ::= SEQUENCE {
77 digestAlgorithm DigestAlgorithmIdentifier,
78 signedAttrs [0] IMPLICIT CMSAttributes OPTIONAL,
79 signatureAlgorithm SignatureAlgorithmIdentifier,
80 signature SignatureValue,
81 unsignedAttrs [1] IMPLICIT CMSAttributes OPTIONAL
84 SignerInfos ::= SET OF SignerInfo
86 SignedData ::= SEQUENCE {
88 digestAlgorithms DigestAlgorithmIdentifiers,
89 encapContentInfo EncapsulatedContentInfo,
90 certificates [0] IMPLICIT CertificateSet OPTIONAL,
91 crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
92 signerInfos SignerInfos
95 OriginatorInfo ::= SEQUENCE {
96 certs [0] IMPLICIT CertificateSet OPTIONAL,
97 crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
100 KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
101 ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
103 EncryptedKey ::= OCTET STRING
105 KeyTransRecipientInfo ::= SEQUENCE {
106 version CMSVersion, -- always set to 0 or 2
107 rid RecipientIdentifier,
108 keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
109 encryptedKey EncryptedKey
112 RecipientInfo ::= KeyTransRecipientInfo
114 RecipientInfos ::= SET OF RecipientInfo
116 EncryptedContent ::= OCTET STRING
118 EncryptedContentInfo ::= SEQUENCE {
119 contentType ContentType,
120 contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
121 encryptedContent [0] IMPLICIT OCTET STRING OPTIONAL
124 UnprotectedAttributes ::= SET OF Attribute -- SIZE (1..MAX)
126 CMSEncryptedData ::= SEQUENCE {
128 encryptedContentInfo EncryptedContentInfo,
129 unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
132 EnvelopedData ::= SEQUENCE {
134 originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
135 recipientInfos RecipientInfos,
136 encryptedContentInfo EncryptedContentInfo,
137 unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
140 -- Data ::= OCTET STRING
142 CMSRC2CBCParameter ::= SEQUENCE {
143 rc2ParameterVersion INTEGER (0..4294967295),
144 iv OCTET STRING -- exactly 8 octets
147 CMSCBCParameter ::= OCTET STRING