# CMS.cnf # CMS conformation file #.IMPORT ../x509af/x509af-exp.cnf #.IMPORT ../x509ce/x509ce-exp.cnf #.IMPORT ../x509if/x509if-exp.cnf #.IMPORT ../x509sat/x509sat-exp.cnf #.OMIT_ASSIGNMENT KeyWrapAlgorithm CBCParameter IV ExtendedCertificateOrCertificate #.END #.EXPORTS ContentInfo ContentType Countersignature Digest DigestAlgorithmIdentifier DigestAlgorithmIdentifiers EncapsulatedContentInfo EnvelopedData IssuerAndSerialNumber SignedAttributes SignedData SignerIdentifier SignerInfo SignerInfos SignatureValue UnsignedAttributes #.REGISTER ContentInfo B "1.2.840.113549.1.9.16.1.6" "id-ct-contentInfo" #OctetString B "1.2.840.113549.1.7.1" "id-data" see x509sat.cnf SignedData B "1.2.840.113549.1.7.2" "id-signedData" EnvelopedData B "1.2.840.113549.1.7.3" "id-envelopedData" DigestedData B "1.2.840.113549.1.7.5" "id-digestedData" EncryptedData B "1.2.840.113549.1.7.6" "id-encryptedData" AuthenticatedData B "1.2.840.113549.1.9.16.1.2" "id-ct-authenticatedData" ContentType B "1.2.840.113549.1.9.3" "id-contentType" MessageDigest B "1.2.840.113549.1.9.4" "id-messageDigest" SigningTime B "1.2.840.113549.1.9.5" "id-signingTime" Countersignature B "1.2.840.113549.1.9.6" "id-counterSignature" ContentInfo B "2.6.1.4.18" "id-et-pkcs7" IssuerAndSerialNumber B "1.3.6.1.4.1.311.16.4" "ms-oe-encryption-key-preference" SMIMECapabilities B "1.2.840.113549.1.9.15" "id-smime-capabilities" SMIMEEncryptionKeyPreference B "1.2.840.113549.1.9.16.2.11" "id-encryption-key-preference" # I think the following should be RC2CBCParameter - but that appears to be incorrect RC2CBCParameters B "1.2.840.113549.3.2" "id-alg-rc2-cbc" RC2CBCParameters B "1.2.840.113549.3.4" "id-alg-rc4" RC2WrapParameter B "1.2.840.113549.1.9.16.3.7" "id-alg-cmsrc2-wrap" # RFC 2798 Attributes - see master list in x509sat.cnf SignedData B "2.16.840.1.113730.3.1.40" "userSMIMECertificate" #.NO_EMIT #.TYPE_RENAME #.FIELD_RENAME SignerInfo/signature signatureValue RecipientEncryptedKey/rid rekRid EncryptedContentInfo/contentType encryptedContentType AttributeCertificateV1/signature signatureValue_v1 AttributeCertificateV1/signatureAlgorithm signatureAlgorithm_v1 AttributeCertificateInfoV1/attributes attributes_v1 AttributeCertificateInfoV1/issuer issuer_v1 AttributeCertificateInfoV1/signature signature_v1 AttributeCertificateInfoV1/version version_v1 RevocationInfoChoice/other otherRIC #.FN_BODY ContentInfo top_tree = tree; %(DEFAULT_BODY)s content_tvb = NULL; top_tree = NULL; #.FN_PARS ContentType FN_VARIANT = _str VAL_PTR = &object_identifier_id #.FN_BODY ContentType const char *name = NULL; %(DEFAULT_BODY)s if(object_identifier_id) { name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); } #.FN_BODY ContentInfo/content offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_BODY EncapsulatedContentInfo/eContent offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &content_tvb); proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_reported_length (content_tvb)); call_ber_oid_callback(object_identifier_id, content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL); #.FN_PARS OtherRecipientInfo/oriType FN_VARIANT = _str VAL_PTR = &object_identifier_id #.FN_BODY OtherRecipientInfo/oriValue offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_PARS OtherKeyAttribute/keyAttrId FN_VARIANT = _str HF_INDEX = hf_cms_ci_contentType VAL_PTR = &object_identifier_id #.FN_BODY OtherKeyAttribute/keyAttr offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_PARS OtherRevocationInfoFormat/otherRevInfoFormat FN_VARIANT = _str VAL_PTR = &object_identifier_id #.FN_BODY OtherRevocationInfoFormat/otherRevInfo offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_PARS Attribute/attrType FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &object_identifier_id #.FN_BODY Attribute/attrType const char *name = NULL; %(DEFAULT_BODY)s if(object_identifier_id) { name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); } #.FN_BODY AttributeValue offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_BODY MessageDigest proto_item *pi; int old_offset = offset; %(DEFAULT_BODY)s pi = actx->created_item; /* move past TLV */ old_offset = get_ber_identifier(tvb, old_offset, NULL, NULL, NULL); old_offset = get_ber_length(tvb, old_offset, NULL, NULL); if(content_tvb) cms_verify_msg_digest(pi, content_tvb, x509af_get_last_algorithm_id(), tvb, old_offset); #.FN_PARS SMIMECapability/capability FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &object_identifier_id #.FN_BODY SMIMECapability/capability const char *name = NULL; %(DEFAULT_BODY)s if(object_identifier_id) { name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id); proto_item_append_text(tree, " %%s", name ? name : object_identifier_id); cap_tree = tree; } #.FN_BODY SMIMECapability/parameters offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); #.FN_PARS RC2ParameterVersion VAL_PTR = &length #.FN_BODY RC2ParameterVersion guint32 length = 0; %(DEFAULT_BODY)s if(cap_tree != NULL) proto_item_append_text(cap_tree, " (%%d bits)", length); #.FN_PARS EncryptedContent VAL_PTR = &encrypted_tvb #.FN_HDR EncryptedContent tvbuff_t *encrypted_tvb; proto_item *item; #.END #.FN_FTR EncryptedContent item = actx->created_item; PBE_decrypt_data(object_identifier_id, encrypted_tvb, actx, item); #.END