2004-10-05 09:18:55 +00:00
|
|
|
# CMS.cnf
|
|
|
|
# CMS conformation file
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
2007-10-16 13:59:40 +00:00
|
|
|
#.IMPORT ../x509af/x509af-exp.cnf
|
2010-01-12 11:49:17 +00:00
|
|
|
#.IMPORT ../x509ce/x509ce-exp.cnf
|
2007-10-16 13:59:40 +00:00
|
|
|
#.IMPORT ../x509if/x509if-exp.cnf
|
2010-01-12 11:49:17 +00:00
|
|
|
#.IMPORT ../x509sat/x509sat-exp.cnf
|
2004-10-05 09:18:55 +00:00
|
|
|
|
2008-07-22 17:28:38 +00:00
|
|
|
#.OMIT_ASSIGNMENT
|
|
|
|
KeyWrapAlgorithm
|
|
|
|
CBCParameter
|
2008-07-22 18:55:49 +00:00
|
|
|
IV
|
2010-01-12 14:29:53 +00:00
|
|
|
ExtendedCertificateOrCertificate
|
2008-07-22 17:28:38 +00:00
|
|
|
#.END
|
|
|
|
|
2004-10-05 09:18:55 +00:00
|
|
|
#.EXPORTS
|
2004-10-29 12:11:42 +00:00
|
|
|
ContentInfo
|
2004-11-22 03:36:26 +00:00
|
|
|
ContentType
|
2004-12-13 08:15:34 +00:00
|
|
|
Countersignature
|
2007-01-13 15:26:13 +00:00
|
|
|
Digest
|
|
|
|
DigestAlgorithmIdentifier
|
2004-11-22 03:36:26 +00:00
|
|
|
DigestAlgorithmIdentifiers
|
2004-10-29 12:11:42 +00:00
|
|
|
EncapsulatedContentInfo
|
2004-12-24 11:24:35 +00:00
|
|
|
EnvelopedData
|
2004-10-05 09:18:55 +00:00
|
|
|
IssuerAndSerialNumber
|
2004-11-22 03:36:26 +00:00
|
|
|
SignedAttributes
|
|
|
|
SignedData
|
|
|
|
SignerIdentifier
|
|
|
|
SignerInfo
|
|
|
|
SignerInfos
|
|
|
|
SignatureValue
|
|
|
|
UnsignedAttributes
|
2004-10-05 09:18:55 +00:00
|
|
|
|
2004-10-26 13:54:09 +00:00
|
|
|
#.REGISTER
|
2007-05-13 20:58:29 +00:00
|
|
|
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"
|
2004-10-26 13:54:09 +00:00
|
|
|
|
2007-05-13 20:58:29 +00:00
|
|
|
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"
|
2005-10-03 05:16:57 +00:00
|
|
|
|
2007-05-13 20:58:29 +00:00
|
|
|
ContentInfo B "2.6.1.4.18" "id-et-pkcs7"
|
2005-12-05 23:00:03 +00:00
|
|
|
|
2007-01-28 10:20:51 +00:00
|
|
|
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"
|
2007-03-23 16:45:49 +00:00
|
|
|
RC2CBCParameters B "1.2.840.113549.3.4" "id-alg-rc4"
|
2007-01-28 10:20:51 +00:00
|
|
|
RC2WrapParameter B "1.2.840.113549.1.9.16.3.7" "id-alg-cmsrc2-wrap"
|
2007-03-23 16:45:49 +00:00
|
|
|
|
2012-11-12 22:00:53 +00:00
|
|
|
# RFC 2798 Attributes - see master list in x509sat.cnf
|
|
|
|
SignedData B "2.16.840.1.113730.3.1.40" "userSMIMECertificate"
|
|
|
|
|
2004-10-05 09:18:55 +00:00
|
|
|
#.NO_EMIT
|
|
|
|
|
|
|
|
#.TYPE_RENAME
|
|
|
|
|
|
|
|
#.FIELD_RENAME
|
2004-10-13 00:21:00 +00:00
|
|
|
SignerInfo/signature signatureValue
|
|
|
|
RecipientEncryptedKey/rid rekRid
|
2005-11-16 07:13:12 +00:00
|
|
|
EncryptedContentInfo/contentType encryptedContentType
|
2010-01-12 11:49:17 +00:00
|
|
|
AttributeCertificateV1/signature signatureValue_v1
|
|
|
|
AttributeCertificateV1/signatureAlgorithm signatureAlgorithm_v1
|
|
|
|
AttributeCertificateInfoV1/attributes attributes_v1
|
|
|
|
AttributeCertificateInfoV1/issuer issuer_v1
|
|
|
|
AttributeCertificateInfoV1/signature signature_v1
|
|
|
|
AttributeCertificateInfoV1/version version_v1
|
2010-01-12 14:29:53 +00:00
|
|
|
RevocationInfoChoice/other otherRIC
|
2005-11-16 07:13:12 +00:00
|
|
|
|
|
|
|
#.FN_BODY ContentInfo
|
|
|
|
top_tree = tree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
content_tvb = NULL;
|
|
|
|
top_tree = NULL;
|
2004-10-05 09:18:55 +00:00
|
|
|
|
2007-01-13 15:26:13 +00:00
|
|
|
#.FN_PARS ContentType
|
|
|
|
FN_VARIANT = _str VAL_PTR = &object_identifier_id
|
|
|
|
|
|
|
|
#.FN_BODY ContentType
|
|
|
|
const char *name = NULL;
|
|
|
|
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
|
2011-02-20 15:05:21 +00:00
|
|
|
if(object_identifier_id) {
|
2007-11-01 19:36:39 +00:00
|
|
|
name = oid_resolved_from_string(object_identifier_id);
|
2011-02-20 15:05:21 +00:00
|
|
|
proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id);
|
2007-01-13 15:26:13 +00:00
|
|
|
}
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
#.FN_BODY ContentInfo/content
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
#.FN_BODY EncapsulatedContentInfo/eContent
|
|
|
|
|
2010-08-24 15:43:32 +00:00
|
|
|
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &content_tvb);
|
2010-08-24 15:46:33 +00:00
|
|
|
proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_length (content_tvb));
|
2010-08-24 15:43:32 +00:00
|
|
|
|
2013-10-31 00:57:03 +00:00
|
|
|
call_ber_oid_callback(object_identifier_id, content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL);
|
2011-02-20 15:05:21 +00:00
|
|
|
|
2010-01-12 11:49:17 +00:00
|
|
|
#.FN_PARS OtherRecipientInfo/oriType
|
|
|
|
FN_VARIANT = _str VAL_PTR = &object_identifier_id
|
|
|
|
|
|
|
|
#.FN_BODY OtherRecipientInfo/oriValue
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2010-01-12 11:49:17 +00:00
|
|
|
|
2005-11-14 10:02:31 +00:00
|
|
|
#.FN_PARS OtherKeyAttribute/keyAttrId
|
|
|
|
FN_VARIANT = _str HF_INDEX = hf_cms_ci_contentType VAL_PTR = &object_identifier_id
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
#.FN_BODY OtherKeyAttribute/keyAttr
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2010-01-12 14:29:53 +00:00
|
|
|
#.FN_PARS OtherRevocationInfoFormat/otherRevInfoFormat
|
|
|
|
FN_VARIANT = _str VAL_PTR = &object_identifier_id
|
2004-10-29 12:11:42 +00:00
|
|
|
|
2010-01-12 14:29:53 +00:00
|
|
|
#.FN_BODY OtherRevocationInfoFormat/otherRevInfo
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2005-11-16 07:13:12 +00:00
|
|
|
|
2005-11-14 10:02:31 +00:00
|
|
|
#.FN_PARS Attribute/attrType
|
|
|
|
FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &object_identifier_id
|
2005-10-03 05:16:57 +00:00
|
|
|
|
2005-11-16 07:13:12 +00:00
|
|
|
#.FN_BODY Attribute/attrType
|
2005-12-06 22:59:30 +00:00
|
|
|
const char *name = NULL;
|
2005-11-16 07:13:12 +00:00
|
|
|
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
|
|
|
|
if(object_identifier_id) {
|
2007-11-01 19:36:39 +00:00
|
|
|
name = oid_resolved_from_string(object_identifier_id);
|
2011-02-20 15:05:21 +00:00
|
|
|
proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id);
|
2005-11-16 07:13:12 +00:00
|
|
|
}
|
|
|
|
|
2005-10-03 05:16:57 +00:00
|
|
|
#.FN_BODY AttributeValue
|
|
|
|
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2005-10-03 05:16:57 +00:00
|
|
|
|
2005-11-16 07:13:12 +00:00
|
|
|
#.FN_BODY MessageDigest
|
|
|
|
proto_item *pi;
|
|
|
|
int old_offset = offset;
|
|
|
|
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
|
2008-01-03 17:49:59 +00:00
|
|
|
pi = actx->created_item;
|
2005-11-16 07:13:12 +00:00
|
|
|
|
|
|
|
/* move past TLV */
|
|
|
|
old_offset = get_ber_identifier(tvb, old_offset, NULL, NULL, NULL);
|
2007-08-24 07:12:04 +00:00
|
|
|
old_offset = get_ber_length(tvb, old_offset, NULL, NULL);
|
2005-11-16 07:13:12 +00:00
|
|
|
|
2011-02-20 15:05:21 +00:00
|
|
|
if(content_tvb)
|
2014-01-08 04:55:59 +00:00
|
|
|
cms_verify_msg_digest(pi, content_tvb, actx->external.direct_reference, tvb, old_offset);
|
2005-11-16 07:13:12 +00:00
|
|
|
|
2007-01-28 10:20:51 +00:00
|
|
|
#.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) {
|
2007-11-01 19:36:39 +00:00
|
|
|
name = oid_resolved_from_string(object_identifier_id);
|
2011-02-20 15:05:21 +00:00
|
|
|
proto_item_append_text(tree, " %%s", name ? name : object_identifier_id);
|
2007-01-28 10:20:51 +00:00
|
|
|
cap_tree = tree;
|
|
|
|
}
|
|
|
|
|
2007-06-05 12:00:57 +00:00
|
|
|
#.FN_BODY SMIMECapability/parameters
|
2007-01-28 10:20:51 +00:00
|
|
|
|
2013-10-31 00:57:03 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
2007-01-28 10:20:51 +00:00
|
|
|
|
|
|
|
#.FN_PARS RC2ParameterVersion
|
|
|
|
VAL_PTR = &length
|
|
|
|
|
|
|
|
#.FN_BODY RC2ParameterVersion
|
|
|
|
guint32 length = 0;
|
|
|
|
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
|
2011-02-20 15:05:21 +00:00
|
|
|
if(cap_tree != NULL)
|
|
|
|
proto_item_append_text(cap_tree, " (%%d bits)", length);
|
2007-01-28 10:20:51 +00:00
|
|
|
|
2007-08-17 19:14:39 +00:00
|
|
|
#.FN_PARS EncryptedContent VAL_PTR = &encrypted_tvb
|
|
|
|
|
|
|
|
#.FN_HDR EncryptedContent
|
|
|
|
tvbuff_t *encrypted_tvb;
|
|
|
|
proto_item *item;
|
|
|
|
#.END
|
|
|
|
|
|
|
|
#.FN_FTR EncryptedContent
|
|
|
|
|
2008-01-03 17:49:59 +00:00
|
|
|
item = actx->created_item;
|
2007-08-17 19:14:39 +00:00
|
|
|
|
|
|
|
PBE_decrypt_data(object_identifier_id, encrypted_tvb, actx, item);
|
|
|
|
|
2004-10-05 09:18:55 +00:00
|
|
|
#.END
|
|
|
|
|
|
|
|
|