From Graeme Lunt

X420 - incorrect ExtendedBodyPart handling
ACSE - support for implicitly tagged EXTERNALs and dissection based upon direct-reference RTSE - same change for RTSE EXTERNAL handling as above CMS  - support for ContentType, MessageDigest, SigningTime and CounterSignature attributes ESS  - support for ESSSecurityLabel and EquivalentLabels attributes


svn path=/trunk/; revision=16072
This commit is contained in:
Anders Broman 2005-10-03 05:17:51 +00:00
parent 8a31ec4d19
commit 9e273834dc
9 changed files with 304 additions and 80 deletions

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-acse.c */
/* .\packet-acse.c */
/* ../../tools/asn2eth.py -X -b -e -p acse -c acse.cnf -s packet-acse-template acse.asn */
/* Input file: packet-acse-template.c */
@ -68,7 +68,7 @@ int proto_acse = -1;
/*--- Included file: packet-acse-hf.c ---*/
static int hf_acse_direct_reference = -1; /* OBJECT_IDENTIFIER */
static int hf_acse_direct_reference = -1; /* T_direct_reference */
static int hf_acse_indirect_reference = -1; /* T_indirect_reference */
static int hf_acse_data_value_descriptor = -1; /* ObjectDescriptor */
static int hf_acse_encoding = -1; /* T_encoding */
@ -305,14 +305,16 @@ find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
static int
dissect_acse_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
dissect_acse_T_direct_reference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, object_identifier_id);
return offset;
}
static int dissect_direct_reference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_acse_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_acse_direct_reference);
return dissect_acse_T_direct_reference(FALSE, tvb, offset, pinfo, tree, hf_acse_direct_reference);
}
@ -357,7 +359,7 @@ static int dissect_data_value_descriptor(packet_info *pinfo, proto_tree *tree, t
static int
dissect_acse_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
return offset;
@ -439,12 +441,14 @@ dissect_acse_EXTERNAL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pack
gint32 tag;
guint32 len1;
/* XXX asn2eth can not yet handle tagged assignment so for the
* time being just remove this tag manually inside the EXTERNAL
* dissector.
*/
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
if(!implicit_tag) {
/* XXX asn2eth can not yet handle tagged assignment so for the
* time being just remove this tag manually inside the EXTERNAL
* dissector.
*/
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
EXTERNAL_sequence, hf_index, ett_acse_EXTERNAL);
@ -480,8 +484,7 @@ static int dissect_aARQ_protocol_version_impl(packet_info *pinfo, proto_tree *tr
static int
dissect_acse_ASO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -519,8 +522,7 @@ static int dissect_ap_title_form1(packet_info *pinfo, proto_tree *tree, tvbuff_t
static int
dissect_acse_AP_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -734,8 +736,7 @@ static int dissect_responder_acse_requirements_impl(packet_info *pinfo, proto_tr
static int
dissect_acse_Mechanism_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -884,8 +885,7 @@ static int dissect_presentation_context_identifier(packet_info *pinfo, proto_tre
static int
dissect_acse_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -900,8 +900,7 @@ static int dissect_abstract_syntax_name_impl(packet_info *pinfo, proto_tree *tre
static int
dissect_acse_TransferSyntaxName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -1806,8 +1805,7 @@ static int dissect_ae_title_form1(packet_info *pinfo, proto_tree *tree, tvbuff_t
static int
dissect_acse_AE_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-acse.h */
/* .\packet-acse.h */
/* ../../tools/asn2eth.py -X -b -e -p acse -c acse.cnf -s packet-acse-template acse.asn */
/* Input file: packet-acse-template.h */

View File

@ -57,11 +57,15 @@ static int hf_cms_ci_contentType = -1;
/*--- Included file: packet-cms-hf.c ---*/
static int hf_cms_ContentInfo_PDU = -1; /* ContentInfo */
static int hf_cms_ContentType_PDU = -1; /* ContentType */
static int hf_cms_SignedData_PDU = -1; /* SignedData */
static int hf_cms_EnvelopedData_PDU = -1; /* EnvelopedData */
static int hf_cms_DigestedData_PDU = -1; /* DigestedData */
static int hf_cms_EncryptedData_PDU = -1; /* EncryptedData */
static int hf_cms_AuthenticatedData_PDU = -1; /* AuthenticatedData */
static int hf_cms_MessageDigest_PDU = -1; /* MessageDigest */
static int hf_cms_SigningTime_PDU = -1; /* SigningTime */
static int hf_cms_Countersignature_PDU = -1; /* Countersignature */
static int hf_cms_contentType = -1; /* T_contentType */
static int hf_cms_content = -1; /* T_content */
static int hf_cms_version = -1; /* CMSVersion */
@ -84,7 +88,9 @@ static int hf_cms_issuerAndSerialNumber = -1; /* IssuerAndSerialNumber */
static int hf_cms_subjectKeyIdentifier = -1; /* SubjectKeyIdentifier */
static int hf_cms_SignedAttributes_item = -1; /* Attribute */
static int hf_cms_UnsignedAttributes_item = -1; /* Attribute */
static int hf_cms_attrType = -1; /* OBJECT_IDENTIFIER */
static int hf_cms_attrType = -1; /* T_attrType */
static int hf_cms_attrValues = -1; /* SET_OF_AttributeValue */
static int hf_cms_attrValues_item = -1; /* AttributeValue */
static int hf_cms_originatorInfo = -1; /* OriginatorInfo */
static int hf_cms_recipientInfos = -1; /* RecipientInfos */
static int hf_cms_encryptedContentInfo = -1; /* EncryptedContentInfo */
@ -130,6 +136,8 @@ static int hf_cms_issuer = -1; /* Name */
static int hf_cms_serialNumber = -1; /* CertificateSerialNumber */
static int hf_cms_keyAttrId = -1; /* T_keyAttrId */
static int hf_cms_keyAttr = -1; /* T_keyAttr */
static int hf_cms_utcTime = -1; /* UTCTime */
static int hf_cms_generalTime = -1; /* GeneralizedTime */
static int hf_cms_extendedCertificateInfo = -1; /* ExtendedCertificateInfo */
static int hf_cms_signature = -1; /* Signature */
static int hf_cms_attributes = -1; /* UnauthAttributes */
@ -151,6 +159,7 @@ static gint ett_cms_SignerIdentifier = -1;
static gint ett_cms_SignedAttributes = -1;
static gint ett_cms_UnsignedAttributes = -1;
static gint ett_cms_Attribute = -1;
static gint ett_cms_SET_OF_AttributeValue = -1;
static gint ett_cms_EnvelopedData = -1;
static gint ett_cms_OriginatorInfo = -1;
static gint ett_cms_RecipientInfos = -1;
@ -178,6 +187,7 @@ static gint ett_cms_CertificateChoices = -1;
static gint ett_cms_CertificateSet = -1;
static gint ett_cms_IssuerAndSerialNumber = -1;
static gint ett_cms_OtherKeyAttribute = -1;
static gint ett_cms_Time = -1;
static gint ett_cms_ExtendedCertificate = -1;
static gint ett_cms_ExtendedCertificateInfo = -1;
@ -382,18 +392,52 @@ static int dissect_encapContentInfo(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_cms_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
dissect_cms_T_attrType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
hf_cms_attrType, object_identifier_id);
return offset;
}
static int dissect_attrType(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_cms_attrType);
return dissect_cms_T_attrType(FALSE, tvb, offset, pinfo, tree, hf_cms_attrType);
}
static int
dissect_cms_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
return offset;
}
static int dissect_attrValues_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_AttributeValue(FALSE, tvb, offset, pinfo, tree, hf_cms_attrValues_item);
}
static const ber_sequence_t SET_OF_AttributeValue_set_of[1] = {
{ BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_attrValues_item },
};
static int
dissect_cms_SET_OF_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
SET_OF_AttributeValue_set_of, hf_index, ett_cms_SET_OF_AttributeValue);
return offset;
}
static int dissect_attrValues(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_SET_OF_AttributeValue(FALSE, tvb, offset, pinfo, tree, hf_cms_attrValues);
}
static const ber_sequence_t Attribute_sequence[] = {
{ BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_attrType },
{ BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_attrValues },
{ 0, 0, 0, NULL }
};
@ -898,6 +942,9 @@ dissect_cms_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset
static int dissect_date(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_cms_date);
}
static int dissect_generalTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_GeneralizedTime(FALSE, tvb, offset, pinfo, tree, hf_cms_generalTime);
}
@ -1327,6 +1374,61 @@ dissect_cms_AuthenticatedData(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
static int
dissect_cms_MessageDigest(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int
dissect_cms_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
pinfo, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int dissect_utcTime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cms_UTCTime(FALSE, tvb, offset, pinfo, tree, hf_cms_utcTime);
}
static const value_string cms_Time_vals[] = {
{ 0, "utcTime" },
{ 1, "generalTime" },
{ 0, NULL }
};
static const ber_choice_t Time_choice[] = {
{ 0, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_utcTime },
{ 1, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_generalTime },
{ 0, 0, 0, 0, NULL }
};
static int
dissect_cms_Time(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
Time_choice, hf_index, ett_cms_Time,
NULL);
return offset;
}
static int
dissect_cms_SigningTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_cms_Time(implicit_tag, tvb, offset, pinfo, tree, hf_index);
return offset;
}
int
dissect_cms_Countersignature(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_cms_SignerInfo(implicit_tag, tvb, offset, pinfo, tree, hf_index);
@ -1339,6 +1441,9 @@ dissect_cms_Countersignature(gboolean implicit_tag _U_, tvbuff_t *tvb, int offse
static void dissect_ContentInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_ContentInfo(FALSE, tvb, 0, pinfo, tree, hf_cms_ContentInfo_PDU);
}
static void dissect_ContentType_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_ContentType(FALSE, tvb, 0, pinfo, tree, hf_cms_ContentType_PDU);
}
static void dissect_SignedData_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_SignedData(FALSE, tvb, 0, pinfo, tree, hf_cms_SignedData_PDU);
}
@ -1354,6 +1459,15 @@ static void dissect_EncryptedData_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_t
static void dissect_AuthenticatedData_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_AuthenticatedData(FALSE, tvb, 0, pinfo, tree, hf_cms_AuthenticatedData_PDU);
}
static void dissect_MessageDigest_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_MessageDigest(FALSE, tvb, 0, pinfo, tree, hf_cms_MessageDigest_PDU);
}
static void dissect_SigningTime_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_SigningTime(FALSE, tvb, 0, pinfo, tree, hf_cms_SigningTime_PDU);
}
static void dissect_Countersignature_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_cms_Countersignature(FALSE, tvb, 0, pinfo, tree, hf_cms_Countersignature_PDU);
}
/*--- End of included file: packet-cms-fn.c ---*/
@ -1376,6 +1490,10 @@ void proto_register_cms(void) {
{ "ContentInfo", "cms.ContentInfo",
FT_NONE, BASE_NONE, NULL, 0,
"ContentInfo", HFILL }},
{ &hf_cms_ContentType_PDU,
{ "ContentType", "cms.ContentType",
FT_STRING, BASE_NONE, NULL, 0,
"ContentType", HFILL }},
{ &hf_cms_SignedData_PDU,
{ "SignedData", "cms.SignedData",
FT_NONE, BASE_NONE, NULL, 0,
@ -1396,6 +1514,18 @@ void proto_register_cms(void) {
{ "AuthenticatedData", "cms.AuthenticatedData",
FT_NONE, BASE_NONE, NULL, 0,
"AuthenticatedData", HFILL }},
{ &hf_cms_MessageDigest_PDU,
{ "MessageDigest", "cms.MessageDigest",
FT_BYTES, BASE_HEX, NULL, 0,
"MessageDigest", HFILL }},
{ &hf_cms_SigningTime_PDU,
{ "SigningTime", "cms.SigningTime",
FT_UINT32, BASE_DEC, VALS(x509af_Time_vals), 0,
"SigningTime", HFILL }},
{ &hf_cms_Countersignature_PDU,
{ "Countersignature", "cms.Countersignature",
FT_NONE, BASE_NONE, NULL, 0,
"Countersignature", HFILL }},
{ &hf_cms_contentType,
{ "contentType", "cms.contentType",
FT_STRING, BASE_NONE, NULL, 0,
@ -1488,6 +1618,14 @@ void proto_register_cms(void) {
{ "attrType", "cms.attrType",
FT_STRING, BASE_NONE, NULL, 0,
"Attribute/attrType", HFILL }},
{ &hf_cms_attrValues,
{ "attrValues", "cms.attrValues",
FT_UINT32, BASE_DEC, NULL, 0,
"Attribute/attrValues", HFILL }},
{ &hf_cms_attrValues_item,
{ "Item", "cms.attrValues_item",
FT_NONE, BASE_NONE, NULL, 0,
"Attribute/attrValues/_item", HFILL }},
{ &hf_cms_originatorInfo,
{ "originatorInfo", "cms.originatorInfo",
FT_NONE, BASE_NONE, NULL, 0,
@ -1668,6 +1806,14 @@ void proto_register_cms(void) {
{ "keyAttr", "cms.keyAttr",
FT_NONE, BASE_NONE, NULL, 0,
"OtherKeyAttribute/keyAttr", HFILL }},
{ &hf_cms_utcTime,
{ "utcTime", "cms.utcTime",
FT_STRING, BASE_NONE, NULL, 0,
"Time/utcTime", HFILL }},
{ &hf_cms_generalTime,
{ "generalTime", "cms.generalTime",
FT_STRING, BASE_NONE, NULL, 0,
"Time/generalTime", HFILL }},
{ &hf_cms_extendedCertificateInfo,
{ "extendedCertificateInfo", "cms.extendedCertificateInfo",
FT_NONE, BASE_NONE, NULL, 0,
@ -1700,6 +1846,7 @@ void proto_register_cms(void) {
&ett_cms_SignedAttributes,
&ett_cms_UnsignedAttributes,
&ett_cms_Attribute,
&ett_cms_SET_OF_AttributeValue,
&ett_cms_EnvelopedData,
&ett_cms_OriginatorInfo,
&ett_cms_RecipientInfos,
@ -1727,6 +1874,7 @@ void proto_register_cms(void) {
&ett_cms_CertificateSet,
&ett_cms_IssuerAndSerialNumber,
&ett_cms_OtherKeyAttribute,
&ett_cms_Time,
&ett_cms_ExtendedCertificate,
&ett_cms_ExtendedCertificateInfo,
@ -1755,6 +1903,10 @@ void proto_reg_handoff_cms(void) {
register_ber_oid_dissector("1.2.840.113549.1.7.5", dissect_DigestedData_PDU, proto_cms, "id-digestedData");
register_ber_oid_dissector("1.2.840.113549.1.7.6", dissect_EncryptedData_PDU, proto_cms, "id-encryptedData");
register_ber_oid_dissector("1.2.840.113549.1.9.16.1.2", dissect_AuthenticatedData_PDU, proto_cms, "id-ct-authenticatedData");
register_ber_oid_dissector("1.2.840.113549.1.9.3", dissect_ContentType_PDU, proto_cms, "id-contentType");
register_ber_oid_dissector("1.2.840.113549.1.9.4", dissect_MessageDigest_PDU, proto_cms, "id-messageDigest");
register_ber_oid_dissector("1.2.840.113549.1.9.5", dissect_SigningTime_PDU, proto_cms, "id-signingTime");
register_ber_oid_dissector("1.2.840.113549.1.9.6", dissect_Countersignature_PDU, proto_cms, "id-counterSignature");
/*--- End of included file: packet-cms-dis-tab.c ---*/

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-cms.h */
/* .\packet-cms.h */
/* ../../tools/asn2eth.py -X -b -e -p cms -c cms.cnf -s packet-cms-template CryptographicMessageSyntax.asn */
/* Input file: packet-cms-template.h */

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-ess.c */
/* .\packet-ess.c */
/* ../../tools/asn2eth.py -X -b -k -e -p ess -c ess.cnf -s packet-ess-template ExtendedSecurityServices.asn */
/* Input file: packet-ess-template.c */
@ -62,6 +62,8 @@ static int hf_ess_Receipt_PDU = -1; /* Receipt */
static int hf_ess_ContentHints_PDU = -1; /* ContentHints */
static int hf_ess_MsgSigDigest_PDU = -1; /* MsgSigDigest */
static int hf_ess_ContentReference_PDU = -1; /* ContentReference */
static int hf_ess_ESSSecurityLabel_PDU = -1; /* ESSSecurityLabel */
static int hf_ess_EquivalentLabels_PDU = -1; /* EquivalentLabels */
static int hf_ess_MLExpansionHistory_PDU = -1; /* MLExpansionHistory */
static int hf_ess_SigningCertificate_PDU = -1; /* SigningCertificate */
static int hf_ess_signedContentIdentifier = -1; /* ContentIdentifier */
@ -75,11 +77,16 @@ static int hf_ess_version = -1; /* ESSVersion */
static int hf_ess_contentType = -1; /* ContentType */
static int hf_ess_originatorSignatureValue = -1; /* OCTET_STRING */
static int hf_ess_contentDescription = -1; /* UTF8String */
static int hf_ess_security_policy_identifier = -1; /* SecurityPolicyIdentifier */
static int hf_ess_security_classification = -1; /* SecurityClassification */
static int hf_ess_privacy_mark = -1; /* ESSPrivacyMark */
static int hf_ess_security_categories = -1; /* SecurityCategories */
static int hf_ess_pString = -1; /* PrintableString */
static int hf_ess_utf8String = -1; /* UTF8String */
static int hf_ess_SecurityCategories_item = -1; /* SecurityCategory */
static int hf_ess_type = -1; /* T_type */
static int hf_ess_value = -1; /* T_value */
static int hf_ess_EquivalentLabels_item = -1; /* ESSSecurityLabel */
static int hf_ess_MLExpansionHistory_item = -1; /* MLData */
static int hf_ess_mailListIdentifier = -1; /* EntityIdentifier */
static int hf_ess_expansionTime = -1; /* GeneralizedTime */
@ -113,9 +120,11 @@ static gint ett_ess_ReceiptsFrom = -1;
static gint ett_ess_Receipt = -1;
static gint ett_ess_ContentHints = -1;
static gint ett_ess_ContentReference = -1;
static gint ett_ess_ESSSecurityLabel = -1;
static gint ett_ess_ESSPrivacyMark = -1;
static gint ett_ess_SecurityCategories = -1;
static gint ett_ess_SecurityCategory = -1;
static gint ett_ess_EquivalentLabels = -1;
static gint ett_ess_MLExpansionHistory = -1;
static gint ett_ess_MLData = -1;
static gint ett_ess_EntityIdentifier = -1;
@ -375,11 +384,13 @@ dissect_ess_ContentReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offse
static int
dissect_ess_SecurityPolicyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
static int dissect_security_policy_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_SecurityPolicyIdentifier(FALSE, tvb, offset, pinfo, tree, hf_ess_security_policy_identifier);
}
static const value_string ess_SecurityClassification_vals[] = {
@ -400,6 +411,9 @@ dissect_ess_SecurityClassification(gboolean implicit_tag _U_, tvbuff_t *tvb, int
return offset;
}
static int dissect_security_classification(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_SecurityClassification(FALSE, tvb, offset, pinfo, tree, hf_ess_security_classification);
}
@ -436,12 +450,15 @@ dissect_ess_ESSPrivacyMark(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
return offset;
}
static int dissect_privacy_mark(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_ESSPrivacyMark(FALSE, tvb, offset, pinfo, tree, hf_ess_privacy_mark);
}
static int
dissect_ess_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
hf_ess_SecurityCategory_type_OID, object_identifier_id);
@ -460,14 +477,14 @@ dissect_ess_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet
return offset;
}
static int dissect_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_T_value(TRUE, tvb, offset, pinfo, tree, hf_ess_value);
static int dissect_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_T_value(FALSE, tvb, offset, pinfo, tree, hf_ess_value);
}
static const ber_sequence_t SecurityCategory_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_type_impl },
{ BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_value_impl },
{ BER_CLASS_CON, 1, 0, dissect_value },
{ 0, 0, 0, NULL }
};
@ -494,6 +511,42 @@ dissect_ess_SecurityCategories(gboolean implicit_tag _U_, tvbuff_t *tvb, int off
return offset;
}
static int dissect_security_categories(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_SecurityCategories(FALSE, tvb, offset, pinfo, tree, hf_ess_security_categories);
}
static const ber_sequence_t ESSSecurityLabel_set[] = {
{ BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_security_policy_identifier },
{ BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_security_classification },
{ BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_privacy_mark },
{ BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_security_categories },
{ 0, 0, 0, NULL }
};
static int
dissect_ess_ESSSecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
ESSSecurityLabel_set, hf_index, ett_ess_ESSSecurityLabel);
return offset;
}
static int dissect_EquivalentLabels_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_ess_ESSSecurityLabel(FALSE, tvb, offset, pinfo, tree, hf_ess_EquivalentLabels_item);
}
static const ber_sequence_t EquivalentLabels_sequence_of[1] = {
{ BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_EquivalentLabels_item },
};
static int
dissect_ess_EquivalentLabels(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
EquivalentLabels_sequence_of, hf_index, ett_ess_EquivalentLabels);
return offset;
}
static const value_string ess_EntityIdentifier_vals[] = {
@ -719,6 +772,12 @@ static void dissect_MsgSigDigest_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tr
static void dissect_ContentReference_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_ess_ContentReference(FALSE, tvb, 0, pinfo, tree, hf_ess_ContentReference_PDU);
}
static void dissect_ESSSecurityLabel_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_ess_ESSSecurityLabel(FALSE, tvb, 0, pinfo, tree, hf_ess_ESSSecurityLabel_PDU);
}
static void dissect_EquivalentLabels_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_ess_EquivalentLabels(FALSE, tvb, 0, pinfo, tree, hf_ess_EquivalentLabels_PDU);
}
static void dissect_MLExpansionHistory_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_ess_MLExpansionHistory(FALSE, tvb, 0, pinfo, tree, hf_ess_MLExpansionHistory_PDU);
}
@ -766,6 +825,14 @@ void proto_register_ess(void) {
{ "ContentReference", "ess.ContentReference",
FT_NONE, BASE_NONE, NULL, 0,
"ContentReference", HFILL }},
{ &hf_ess_ESSSecurityLabel_PDU,
{ "ESSSecurityLabel", "ess.ESSSecurityLabel",
FT_NONE, BASE_NONE, NULL, 0,
"ESSSecurityLabel", HFILL }},
{ &hf_ess_EquivalentLabels_PDU,
{ "EquivalentLabels", "ess.EquivalentLabels",
FT_UINT32, BASE_DEC, NULL, 0,
"EquivalentLabels", HFILL }},
{ &hf_ess_MLExpansionHistory_PDU,
{ "MLExpansionHistory", "ess.MLExpansionHistory",
FT_UINT32, BASE_DEC, NULL, 0,
@ -818,6 +885,22 @@ void proto_register_ess(void) {
{ "contentDescription", "ess.contentDescription",
FT_STRING, BASE_NONE, NULL, 0,
"ContentHints/contentDescription", HFILL }},
{ &hf_ess_security_policy_identifier,
{ "security-policy-identifier", "ess.security_policy_identifier",
FT_STRING, BASE_NONE, NULL, 0,
"ESSSecurityLabel/security-policy-identifier", HFILL }},
{ &hf_ess_security_classification,
{ "security-classification", "ess.security_classification",
FT_INT32, BASE_DEC, VALS(ess_SecurityClassification_vals), 0,
"ESSSecurityLabel/security-classification", HFILL }},
{ &hf_ess_privacy_mark,
{ "privacy-mark", "ess.privacy_mark",
FT_UINT32, BASE_DEC, VALS(ess_ESSPrivacyMark_vals), 0,
"ESSSecurityLabel/privacy-mark", HFILL }},
{ &hf_ess_security_categories,
{ "security-categories", "ess.security_categories",
FT_UINT32, BASE_DEC, NULL, 0,
"ESSSecurityLabel/security-categories", HFILL }},
{ &hf_ess_pString,
{ "pString", "ess.pString",
FT_STRING, BASE_NONE, NULL, 0,
@ -838,6 +921,10 @@ void proto_register_ess(void) {
{ "value", "ess.value",
FT_NONE, BASE_NONE, NULL, 0,
"SecurityCategory/value", HFILL }},
{ &hf_ess_EquivalentLabels_item,
{ "Item", "ess.EquivalentLabels_item",
FT_NONE, BASE_NONE, NULL, 0,
"EquivalentLabels/_item", HFILL }},
{ &hf_ess_MLExpansionHistory_item,
{ "Item", "ess.MLExpansionHistory_item",
FT_NONE, BASE_NONE, NULL, 0,
@ -930,9 +1017,11 @@ void proto_register_ess(void) {
&ett_ess_Receipt,
&ett_ess_ContentHints,
&ett_ess_ContentReference,
&ett_ess_ESSSecurityLabel,
&ett_ess_ESSPrivacyMark,
&ett_ess_SecurityCategories,
&ett_ess_SecurityCategory,
&ett_ess_EquivalentLabels,
&ett_ess_MLExpansionHistory,
&ett_ess_MLData,
&ett_ess_EntityIdentifier,
@ -968,6 +1057,8 @@ void proto_reg_handoff_ess(void) {
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.4", dissect_ContentHints_PDU, proto_ess, "id-aa-contentHint");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.5", dissect_MsgSigDigest_PDU, proto_ess, "id-aa-msgSigDigest");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.10", dissect_ContentReference_PDU, proto_ess, "id-aa-contentReference");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.2", dissect_ESSSecurityLabel_PDU, proto_ess, "id-aa-securityLabel");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.9", dissect_EquivalentLabels_PDU, proto_ess, "id-aa-equivalentLabels");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.3", dissect_MLExpansionHistory_PDU, proto_ess, "id-aa-mlExpandHistory");
register_ber_oid_dissector("1.2.840.113549.1.9.16.2.12", dissect_SigningCertificate_PDU, proto_ess, "id-aa-signingCertificate");

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-ess.h */
/* .\packet-ess.h */
/* ../../tools/asn2eth.py -X -b -k -e -p ess -c ess.cnf -s packet-ess-template ExtendedSecurityServices.asn */
/* Input file: packet-ess-template.h */

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-rtse.c */
/* .\packet-rtse.c */
/* ../../tools/asn2eth.py -X -b -e -p rtse -c rtse.cnf -s packet-rtse-template rtse.asn */
/* Input file: packet-rtse-template.c */
@ -642,8 +642,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pa
static int
dissect_rtse_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
@ -738,19 +737,22 @@ static const ber_sequence_t EXTERNAL_sequence[] = {
{ 0, 0, 0, NULL }
};
static int
int
dissect_rtse_EXTERNAL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
gint8 class;
gboolean pc, ind_field;
gint32 tag;
guint32 len1;
/* XXX asn2eth can not yet handle tagged assignment so for the
* time being just remove this tag manually inside the EXTERNAL
* dissector.
*/
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
if(!implicit_tag) {
/* XXX asn2eth can not yet handle tagged assignment so for the
* time being just remove this tag manually inside the EXTERNAL
* dissector.
*/
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
EXTERNAL_sequence, hf_index, ett_rtse_EXTERNAL);

View File

@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* ./packet-rtse.h */
/* .\packet-rtse.h */
/* ../../tools/asn2eth.py -X -b -e -p rtse -c rtse.cnf -s packet-rtse-template rtse.asn */
/* Input file: packet-rtse-template.h */
@ -40,6 +40,7 @@ int dissect_rtse_RTORQapdu(gboolean implicit_tag, tvbuff_t *tvb, int offset, pac
int dissect_rtse_RTOACapdu(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_rtse_RTORJapdu(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_rtse_RTABapdu(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_rtse_EXTERNAL(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
/*--- End of included file: packet-rtse-exp.h ---*/

View File

@ -116,8 +116,8 @@ static int hf_x420_mixed_mode = -1; /* MixedModeBodyPart */
static int hf_x420_bilaterally_defined = -1; /* BilaterallyDefinedBodyPart */
static int hf_x420_nationally_defined = -1; /* NationallyDefinedBodyPart */
static int hf_x420_extended = -1; /* ExtendedBodyPart */
static int hf_x420_extended_parameters = -1; /* OBJECT_IDENTIFIER */
static int hf_x420_extended_data = -1; /* T_data */
static int hf_x420_extended_parameters = -1; /* EXTERNAL */
static int hf_x420_extended_data = -1; /* EXTERNAL */
static int hf_x420_ia5text_parameters = -1; /* IA5TextParameters */
static int hf_x420_ia5text_data = -1; /* IA5TextData */
static int hf_x420_repertoire = -1; /* Repertoire */
@ -269,6 +269,12 @@ static int dissect_user(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int
static int dissect_formal_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x411_ORName(FALSE, tvb, offset, pinfo, tree, hf_x420_formal_name);
}
static int dissect_extended_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_acse_EXTERNAL(TRUE, tvb, offset, pinfo, tree, hf_x420_extended_parameters);
}
static int dissect_extended_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_acse_EXTERNAL(FALSE, tvb, offset, pinfo, tree, hf_x420_extended_data);
}
static int dissect_g3facsimile_non_basic_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x411_G3FacsimileNonBasicParameters(TRUE, tvb, offset, pinfo, tree, hf_x420_g3facsimile_non_basic_parameters);
}
@ -1344,35 +1350,9 @@ static int dissect_nationally_defined_impl(packet_info *pinfo, proto_tree *tree,
}
static int
dissect_x420_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
return offset;
}
static int dissect_extended_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x420_OBJECT_IDENTIFIER(TRUE, tvb, offset, pinfo, tree, hf_x420_extended_parameters);
}
static int
dissect_x420_T_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
/* XXX Not implemented yet */
return offset;
}
static int dissect_extended_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x420_T_data(FALSE, tvb, offset, pinfo, tree, hf_x420_extended_data);
}
static const ber_sequence_t ExtendedBodyPart_sequence[] = {
{ BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_extended_parameters_impl },
{ BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_extended_data },
{ BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_extended_data },
{ 0, 0, 0, NULL }
};
@ -2238,7 +2218,7 @@ void proto_register_x420(void) {
"BodyPart/extended", HFILL }},
{ &hf_x420_extended_parameters,
{ "parameters", "x420.parameters",
FT_STRING, BASE_NONE, NULL, 0,
FT_NONE, BASE_NONE, NULL, 0,
"ExtendedBodyPart/parameters", HFILL }},
{ &hf_x420_extended_data,
{ "data", "x420.data",