2 # CMS conformation file
4 #.IMPORT ../x509af/x509af-exp.cnf
5 #.IMPORT ../x509ce/x509ce-exp.cnf
6 #.IMPORT ../x509if/x509if-exp.cnf
7 #.IMPORT ../x509sat/x509sat-exp.cnf
11 ExtendedCertificateOrCertificate
19 DigestAlgorithmIdentifier
20 DigestAlgorithmIdentifiers
22 EncapsulatedContentInfo
35 ContentInfo B "1.2.840.113549.1.9.16.1.6" "id-ct-contentInfo"
36 #OctetString B "1.2.840.113549.1.7.1" "id-data" see x509sat.cnf
37 SignedData B "1.2.840.113549.1.7.2" "id-signedData"
38 EnvelopedData B "1.2.840.113549.1.7.3" "id-envelopedData"
39 DigestedData B "1.2.840.113549.1.7.5" "id-digestedData"
40 EncryptedData B "1.2.840.113549.1.7.6" "id-encryptedData"
41 AuthenticatedData B "1.2.840.113549.1.9.16.1.2" "id-ct-authenticatedData"
42 EncryptedContentInfo B "1.2.840.113549.1.9.16.1.9" "id-ct-compressedData"
43 AuthEnvelopedData B "1.2.840.113549.1.9.16.1.23" "id-ct-authEnvelopedData"
45 ContentType B "1.2.840.113549.1.9.3" "id-contentType"
46 MessageDigest B "1.2.840.113549.1.9.4" "id-messageDigest"
47 SigningTime B "1.2.840.113549.1.9.5" "id-signingTime"
48 Countersignature B "1.2.840.113549.1.9.6" "id-counterSignature"
50 ContentInfo B "2.6.1.4.18" "id-et-pkcs7"
52 IssuerAndSerialNumber B "1.3.6.1.4.1.311.16.4" "ms-oe-encryption-key-preference"
53 SMIMECapabilities B "1.2.840.113549.1.9.15" "id-smime-capabilities"
54 SMIMEEncryptionKeyPreference B "1.2.840.113549.1.9.16.2.11" "id-encryption-key-preference"
56 # I think the following should be RC2CBCParameter - but that appears to be incorrect
57 RC2CBCParameters B "1.2.840.113549.3.4" "id-alg-rc4"
59 KeyEncryptionAlgorithmIdentifier B "0.4.0.127.0.7.1.1.5.1.1.3" "ecka-eg-X963KDF-SHA256"
60 KeyEncryptionAlgorithmIdentifier B "0.4.0.127.0.7.1.1.5.1.1.4" "ecka-eg-X963KDF-SHA384"
61 KeyEncryptionAlgorithmIdentifier B "0.4.0.127.0.7.1.1.5.1.1.5" "ecka-eg-X963KDF-SHA512"
63 KeyEncryptionAlgorithmIdentifier B "2.16.840.1.101.3.4.1.5" "id-aes128-wrap"
64 KeyEncryptionAlgorithmIdentifier B "2.16.840.1.101.3.4.1.25" "id-aes192-wrap"
65 KeyEncryptionAlgorithmIdentifier B "2.16.840.1.101.3.4.1.45" "id-aes256-wrap"
67 GCMParameters B "2.16.840.1.101.3.4.1.6" "id-aes128-GCM"
68 GCMParameters B "2.16.840.1.101.3.4.1.26" "id-aes192-GCM"
69 GCMParameters B "2.16.840.1.101.3.4.1.46" "id-aes256-GCM"
71 CCMParameters B "2.16.840.1.101.3.4.1.7" "id-aes128-CCM"
72 CCMParameters B "2.16.840.1.101.3.4.1.27" "id-aes192-CCM"
73 CCMParameters B "2.16.840.1.101.3.4.1.44" "id-aes256-CCM"
75 # EC algorithms from RFC 3278 / RFC 5753
76 KeyWrapAlgorithm B "1.3.133.16.840.63.0.2" "dhSinglePass-stdDH-sha1kdf-scheme"
77 KeyWrapAlgorithm B "1.3.132.1.11.0" "dhSinglePass-stdDH-sha224kdf-scheme"
78 KeyWrapAlgorithm B "1.3.132.1.11.1" "dhSinglePass-stdDH-sha256kdf-scheme"
79 KeyWrapAlgorithm B "1.3.132.1.11.2" "dhSinglePass-stdDH-sha384kdf-scheme"
80 KeyWrapAlgorithm B "1.3.132.1.11.3" "dhSinglePass-stdDH-sha512kdf-scheme"
81 KeyWrapAlgorithm B "1.3.133.16.840.63.0.3" "dhSinglePass-cofactorDH-sha1kdf-scheme"
82 KeyWrapAlgorithm B "1.3.132.1.14.0" "dhSinglePass-cofactorDH-sha224kdf-scheme"
83 KeyWrapAlgorithm B "1.3.132.1.14.1" "dhSinglePass-cofactorDH-sha256kdf-scheme"
84 KeyWrapAlgorithm B "1.3.132.1.14.2" "dhSinglePass-cofactorDH-sha384kdf-scheme"
85 KeyWrapAlgorithm B "1.3.132.1.14.3" "dhSinglePass-cofactorDH-sha512kdf-scheme"
86 KeyWrapAlgorithm B "1.3.133.16.840.63.0.16" "mqvSinglePass-sha1kdf-scheme"
87 KeyWrapAlgorithm B "1.3.132.1.15.0" "mqvSinglePass-sha224kdf-scheme"
88 KeyWrapAlgorithm B "1.3.132.1.15.1" "mqvSinglePass-sha256kdf-scheme"
89 KeyWrapAlgorithm B "1.3.132.1.15.2" "mqvSinglePass-sha384kdf-scheme"
90 KeyWrapAlgorithm B "1.3.132.1.15.3" "mqvSinglePass-sha512kdf-scheme"
92 # RFC 3370 [CMS-ASN] (and RFC 5911 section 3)
93 # - section 4.3.1 - registered in packet-cms-template.c
94 # NULL B "1.2.840.113549.1.9.16.3.6" "id-alg-CMS3DESwrap"
96 RC2WrapParameter B "1.2.840.113549.1.9.16.3.7" "id-alg-CMSRC2-wrap"
97 # - section 4.4.1 - PBKDF2-params defined in PKCS#5 / RFC 8018 - not yet implemented
98 # PBKDF2-params B "1.2.840.113549.1.5.12" "id-PBKDF2"
100 IV B "1.2.840.113549.3.7" "des-ede3-cbc"
102 RC2CBCParameters B "1.2.840.113549.3.2" "rc2-cbc"
104 # RFC 2798 Attributes - see master list in x509sat.cnf
105 SignedData B "2.16.840.1.113730.3.1.40" "userSMIMECertificate"
107 # RFC 4108 Attributes (in CMSFirmwareWrapper.asn)
108 FirmwarePkgData B "1.2.840.113549.1.9.16.1.16" "id-ct-firmwarePackage"
109 FirmwarePackageIdentifier B "1.2.840.113549.1.9.16.2.35" "id-aa-firmwarePackageID"
110 TargetHardwareIdentifiers B "1.2.840.113549.1.9.16.2.36" "id-aa-targetHardwareIDs"
111 DecryptKeyIdentifier B "1.2.840.113549.1.9.16.2.37" "id-aa-decryptKeyID"
112 ImplementedCryptoAlgorithms B "1.2.840.113549.1.9.16.2.38" "id-aa-implCryptoAlgs"
113 ImplementedCompressAlgorithms B "1.2.840.113549.1.9.16.2.43" "id-aa-implCompressAlgs"
114 CommunityIdentifiers B "1.2.840.113549.1.9.16.2.40" "id-aa-communityIdentifiers"
115 FirmwarePackageInfo B "1.2.840.113549.1.9.16.2.42" "id-aa-firmwarePackageInfo"
116 WrappedFirmwareKey B "1.2.840.113549.1.9.16.2.39" "id-aa-wrappedFirmwareKey"
117 FirmwarePackageLoadReceipt B "1.2.840.113549.1.9.16.1.17" "id-ct-firmwareLoadReceipt"
118 FirmwarePackageLoadError B "1.2.840.113549.1.9.16.1.18" "id-ct-firmwareLoadError"
119 HardwareModuleName B "1.3.6.1.5.5.7.8.4" "id-on-hardwareModuleName"
120 FirmwarePackageMessageDigest B "1.2.840.113549.1.9.16.2.41" "id-aa-fwPkgMessageDigest"
127 SignerInfo/signature signatureValue
128 RecipientEncryptedKey/rid rekRid
129 EncryptedContentInfo/contentType encryptedContentType
130 AttributeCertificateV1/signature signatureValue_v1
131 AttributeCertificateV1/signatureAlgorithm signatureAlgorithm_v1
132 AttributeCertificateInfoV1/attributes attributes_v1
133 AttributeCertificateInfoV1/issuer issuer_v1
134 AttributeCertificateInfoV1/signature signature_v1
135 AttributeCertificateInfoV1/version version_v1
136 RevocationInfoChoice/other otherRIC
137 FirmwarePackageLoadReceipt/version fwReceiptVersion
138 FirmwarePackageLoadError/version fwErrorVersion
140 #.FN_BODY ContentInfo
145 #.FN_PARS ContentType
146 FN_VARIANT = _str VAL_PTR = &cms_data->object_identifier_id
148 #.FN_BODY ContentType
149 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
150 cms_data->object_identifier_id = NULL;
151 const char *name = NULL;
155 if(cms_data->object_identifier_id) {
156 name = oid_resolved_from_string(actx->pinfo->pool, cms_data->object_identifier_id);
157 proto_item_append_text(tree, " (%%s)", name ? name : cms_data->object_identifier_id);
160 #.FN_BODY ContentInfo/content
161 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
162 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
165 #.FN_BODY EncapsulatedContentInfo/eContent
166 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
167 cms_data->content_tvb = NULL;
168 offset = dissect_ber_octet_string(false, actx, tree, tvb, offset, hf_index, &cms_data->content_tvb);
170 if(cms_data->content_tvb) {
171 proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_reported_length(cms_data->content_tvb));
173 call_ber_oid_callback(cms_data->object_identifier_id, cms_data->content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL);
176 #.FN_PARS OtherRecipientInfo/oriType
177 FN_VARIANT = _str VAL_PTR = &cms_data->object_identifier_id
179 #.FN_HDR OtherRecipientInfo/oriType
180 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
181 cms_data->object_identifier_id = NULL;
183 #.FN_BODY OtherRecipientInfo/oriValue
184 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
185 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
187 #.FN_PARS OtherKeyAttribute/keyAttrId
188 FN_VARIANT = _str HF_INDEX = hf_cms_ci_contentType VAL_PTR = &cms_data->object_identifier_id
190 #.FN_HDR OtherKeyAttribute/keyAttrId
191 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
192 cms_data->object_identifier_id = NULL;
194 #.FN_BODY OtherKeyAttribute/keyAttr
195 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
196 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
198 #.FN_PARS OtherRevocationInfoFormat/otherRevInfoFormat
199 FN_VARIANT = _str VAL_PTR = &cms_data->object_identifier_id
201 #.FN_HDR OtherRevocationInfoFormat/otherRevInfoFormat
202 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
203 cms_data->object_identifier_id = NULL;
205 #.FN_BODY OtherRevocationInfoFormat/otherRevInfo
206 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
207 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
209 #.FN_PARS Attribute/attrType
210 FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &cms_data->object_identifier_id
212 #.FN_BODY Attribute/attrType
213 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
214 cms_data->object_identifier_id = NULL;
215 const char *name = NULL;
219 if(cms_data->object_identifier_id) {
220 name = oid_resolved_from_string(actx->pinfo->pool, cms_data->object_identifier_id);
221 proto_item_append_text(tree, " (%%s)", name ? name : cms_data->object_identifier_id);
224 #.FN_BODY AttributeValue
225 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
227 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
229 #.FN_BODY MessageDigest
230 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
232 int old_offset = offset;
236 pi = actx->created_item;
239 old_offset = get_ber_identifier(tvb, old_offset, NULL, NULL, NULL);
240 old_offset = get_ber_length(tvb, old_offset, NULL, NULL);
242 if(cms_data->content_tvb)
243 cms_verify_msg_digest(pi, cms_data->content_tvb, x509af_get_last_algorithm_id(), tvb, old_offset);
245 #.FN_PARS SMIMECapability/capability
246 FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &cms_data->object_identifier_id
248 #.FN_BODY SMIMECapability/capability
249 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
250 cms_data->object_identifier_id = NULL;
251 const char *name = NULL;
255 if(cms_data->object_identifier_id) {
256 name = oid_resolved_from_string(actx->pinfo->pool, cms_data->object_identifier_id);
257 proto_item_append_text(tree, " %%s", name ? name : cms_data->object_identifier_id);
261 #.FN_BODY SMIMECapability/parameters
262 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
264 offset=call_ber_oid_callback(cms_data->object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
266 #.FN_PARS RC2ParameterVersion
269 #.FN_BODY RC2ParameterVersion
275 proto_item_append_text(cap_tree, " (%%d bits)", length);
277 #.FN_PARS EncryptedContent VAL_PTR = &encrypted_tvb
279 #.FN_HDR EncryptedContent
280 tvbuff_t *encrypted_tvb;
284 #.FN_FTR EncryptedContent
285 struct cms_private_data *cms_data = cms_get_private_data(actx->pinfo);
287 item = actx->created_item;
289 PBE_decrypt_data(cms_data->object_identifier_id, encrypted_tvb, actx->pinfo, actx, item);