2004-10-05 09:18:55 +00:00
|
|
|
# CMS.cnf
|
|
|
|
# CMS conformation file
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
2004-11-21 10:16:06 +00:00
|
|
|
#.INCLUDE ../x509af/x509af-exp.cnf
|
2004-11-21 08:22:21 +00:00
|
|
|
#.INCLUDE ../x509if/x509if-exp.cnf
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#.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
|
|
|
|
|
|
|
|
if(object_identifier_id) {
|
|
|
|
name = get_oid_str_name(object_identifier_id);
|
|
|
|
proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id);
|
|
|
|
}
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
#.FN_BODY ContentInfo/content
|
2007-05-13 20:58:29 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
#.FN_BODY EncapsulatedContentInfo/eContent
|
2005-07-09 02:58:07 +00:00
|
|
|
gint8 class;
|
2004-10-29 12:11:42 +00:00
|
|
|
gboolean pc, ind;
|
2005-07-09 02:58:07 +00:00
|
|
|
gint32 tag;
|
|
|
|
guint32 len;
|
2004-10-29 12:11:42 +00:00
|
|
|
int pdu_offset = offset;
|
2005-11-16 07:13:12 +00:00
|
|
|
int content_offset;
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
/* XXX Do we care about printing out the octet string? */
|
2007-05-13 20:58:29 +00:00
|
|
|
offset = dissect_cms_OCTET_STRING(FALSE, tvb, offset, actx, NULL, hf_cms_eContent);
|
2004-10-29 12:11:42 +00:00
|
|
|
|
|
|
|
pdu_offset = get_ber_identifier(tvb, pdu_offset, &class, &pc, &tag);
|
2005-11-16 07:13:12 +00:00
|
|
|
content_offset = pdu_offset = get_ber_length(tree, tvb, pdu_offset, &len, &ind);
|
2007-05-13 20:58:29 +00:00
|
|
|
pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, actx->pinfo, top_tree ? top_tree : tree);
|
2005-11-16 07:13:12 +00:00
|
|
|
|
2007-01-13 15:26:13 +00:00
|
|
|
/* save the content for checking the message digest */
|
2005-11-16 07:13:12 +00:00
|
|
|
content_tvb = tvb_new_subset(tvb, content_offset, len, -1);
|
2004-10-29 12:11:42 +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
|
2007-05-13 20:58:29 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
2004-10-29 12:11:42 +00:00
|
|
|
|
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) {
|
2006-06-28 14:19:08 +00:00
|
|
|
name = get_oid_str_name(object_identifier_id);
|
2005-11-16 07:13:12 +00:00
|
|
|
proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id);
|
|
|
|
}
|
|
|
|
|
2005-10-03 05:16:57 +00:00
|
|
|
#.FN_BODY AttributeValue
|
|
|
|
|
2007-05-13 20:58:29 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
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
|
|
|
|
|
|
|
|
pi = get_ber_last_created_item();
|
|
|
|
|
|
|
|
/* move past TLV */
|
|
|
|
old_offset = get_ber_identifier(tvb, old_offset, NULL, NULL, NULL);
|
|
|
|
old_offset = get_ber_length(tree, tvb, old_offset, NULL, NULL);
|
|
|
|
|
|
|
|
if(content_tvb)
|
|
|
|
cms_verify_msg_digest(pi, content_tvb, x509af_get_last_algorithm_id(), tvb, old_offset);
|
|
|
|
|
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) {
|
|
|
|
name = get_oid_str_name(object_identifier_id);
|
|
|
|
proto_item_append_text(tree, " %%s", name ? name : object_identifier_id);
|
|
|
|
cap_tree = tree;
|
|
|
|
}
|
|
|
|
|
|
|
|
#.FN_BODY T_parameters
|
|
|
|
|
2007-05-13 20:58:29 +00:00
|
|
|
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
2007-01-28 10:20:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
#.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);
|
|
|
|
|
2004-10-05 09:18:55 +00:00
|
|
|
#.END
|
|
|
|
|
|
|
|
|