aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-11-16 07:13:12 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-11-16 07:13:12 +0000
commitc33182b8982742ece2bbfa298977a5aa09f48377 (patch)
tree0c7664cef1a075c4ecb3ad5ddc8d364055957829 /epan
parent893ad69c74f54fc9bb7ac7b7ffc3c0e28bd4d418 (diff)
From Graeme Lunt:
Here are a number of small patches for asn1 based dissectors: acse: release request/response column information (many X.400/X.500 unbinds are empty) "standardised" PNAME to "ISO 8650-1 OSI Association Control Service" fix for crash when using EXTERNAL dissector rtse: column information when attempting a resume x509if: generation of LDAP-style DNs from RDNSequences new function x509if_get_last_dn() to get the last DN generated. x509af: DSS parameters certificate extension naming subject naming of certificate x509sat: Guide syntax (as SET now supported) PDU exports. cms: verification of message digest attribute (SHA-1 and MD5) ess: enumerated/restrictive/permissive/informative security categories x411: generation of string encoding of X.400 addresses, trace information and message identifiers. s4406: separate types for primary and copy precedence to allow better filtering (e.g. primary precedence = flash) priority-level-qualifier svn path=/trunk/; revision=16508
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-acse.c38
-rw-r--r--epan/dissectors/packet-cms.c130
-rw-r--r--epan/dissectors/packet-ess.c238
-rw-r--r--epan/dissectors/packet-rtse.c43
-rw-r--r--epan/dissectors/packet-rtse.h2
-rw-r--r--epan/dissectors/packet-s4406.c123
-rw-r--r--epan/dissectors/packet-s5066.c4
-rw-r--r--epan/dissectors/packet-x411.c326
-rw-r--r--epan/dissectors/packet-x411.h2
-rw-r--r--epan/dissectors/packet-x509af.c149
-rw-r--r--epan/dissectors/packet-x509af.h4
-rw-r--r--epan/dissectors/packet-x509if.c171
-rw-r--r--epan/dissectors/packet-x509if.h5
-rw-r--r--epan/dissectors/packet-x509sat.c194
-rw-r--r--epan/dissectors/packet-x509sat.h2
15 files changed, 1278 insertions, 153 deletions
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c
index 6cedf275dc..86b2078e5c 100644
--- a/epan/dissectors/packet-acse.c
+++ b/epan/dissectors/packet-acse.c
@@ -59,7 +59,7 @@
#include "packet-pres.h"
#include "packet-x509if.h"
-#define PNAME "ACSE"
+#define PNAME "ISO 8650-1 OSI Association Control Service"
#define PSNAME "ACSE"
#define PFNAME "acse"
@@ -1398,8 +1398,16 @@ static const value_string acse_Release_request_reason_vals[] = {
static int
dissect_acse_Release_request_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ int reason = -1;
+
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &reason);
+
+
+ if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Request (%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%d)"));
+
+
return offset;
}
@@ -1438,8 +1446,18 @@ static const value_string acse_Release_response_reason_vals[] = {
static int
dissect_acse_Release_response_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ int reason = -1;
+
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &reason);
+
+
+ if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Response (%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%d)"));
+
+
+
+
return offset;
}
@@ -1848,8 +1866,6 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree *tree=NULL;
char *oid;
- /* save parent_tree so subdissectors can create new top nodes */
- top_tree=parent_tree;
/* first, try to check length */
/* do we have at least 2 bytes */
@@ -1875,6 +1891,9 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
}
}
+ /* save parent_tree so subdissectors can create new top nodes */
+ top_tree=parent_tree;
+
/* ACSE has only AARQ,AARE,RLRQ,RLRE,ABRT type of pdu */
/* reject everything else */
/* data pdu is not ACSE pdu and has to go directly to app dissector */
@@ -1899,8 +1918,10 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree_add_text(parent_tree, tvb, offset, -1,
"dissector is not available");
}
+ top_tree = NULL;
return;
default:
+ top_tree = NULL;
return;
}
@@ -1926,7 +1947,8 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
}
}
-
+
+top_tree = NULL;
}
/*--- proto_register_acse ----------------------------------------------*/
diff --git a/epan/dissectors/packet-cms.c b/epan/dissectors/packet-cms.c
index 6eeef3220f..cedae74489 100644
--- a/epan/dissectors/packet-cms.c
+++ b/epan/dissectors/packet-cms.c
@@ -46,6 +46,9 @@
#include "packet-x509af.h"
#include "packet-x509if.h"
+#include <epan/sha1.h>
+#include <epan/crypt-md5.h>
+
#define PNAME "Cryptographic Message Syntax"
#define PSNAME "CMS"
#define PFNAME "cms"
@@ -97,7 +100,7 @@ static int hf_cms_encryptedContentInfo = -1; /* EncryptedContentInfo */
static int hf_cms_unprotectedAttrs = -1; /* UnprotectedAttributes */
static int hf_cms_certs = -1; /* CertificateSet */
static int hf_cms_RecipientInfos_item = -1; /* RecipientInfo */
-static int hf_cms_contentType1 = -1; /* ContentType */
+static int hf_cms_encryptedContentType = -1; /* ContentType */
static int hf_cms_contentEncryptionAlgorithm = -1; /* ContentEncryptionAlgorithmIdentifier */
static int hf_cms_encryptedContent = -1; /* EncryptedContent */
static int hf_cms_UnprotectedAttributes_item = -1; /* Attribute */
@@ -198,6 +201,78 @@ static int dissect_cms_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, in
static const char *object_identifier_id;
+static tvbuff_t *content_tvb = NULL;
+
+static proto_tree *top_tree=NULL;
+
+#define HASH_SHA1 "1.3.14.3.2.26"
+#define SHA1_BUFFER_SIZE 20
+
+#define HASH_MD5 "1.2.840.113549.2.5"
+#define MD5_BUFFER_SIZE 16
+
+
+/* SHA-2 variants */
+#define HASH_SHA224 "2.16.840.1.101.3.4.2.4"
+#define SHA224_BUFFER_SIZE 32 /* actually 28 */
+#define HASH_SHA256 "2.16.840.1.101.3.4.2.1"
+#define SHA256_BUFFER_SIZE 32
+
+unsigned char digest_buf[MAX(SHA1_BUFFER_SIZE, MD5_BUFFER_SIZE)];
+
+static void
+cms_verify_msg_digest(proto_item *pi, tvbuff_t *content, char *alg, tvbuff_t *tvb, int offset)
+{
+ sha1_context sha1_ctx;
+ md5_state_t md5_ctx;
+ int i= 0, buffer_size = 0;
+
+ /* we only support two algorithms at the moment - if we do add SHA2
+ we should add a registration process to use a registration process */
+
+ if(strcmp(alg, HASH_SHA1) == 0) {
+
+ sha1_starts(&sha1_ctx);
+
+ sha1_update(&sha1_ctx,
+ (guint8*)tvb_get_ptr(content, 0, tvb_length(content)),
+ tvb_length(content));
+
+ sha1_finish(&sha1_ctx, digest_buf);
+
+ buffer_size = SHA1_BUFFER_SIZE;
+
+ } else if(strcmp(alg, HASH_MD5) == 0) {
+
+ md5_init(&md5_ctx);
+
+ md5_append(&md5_ctx,
+ (const guint8*) tvb_get_ptr(content, 0, tvb_length(content)),
+ tvb_length(content));
+
+ md5_finish(&md5_ctx, digest_buf);
+
+ buffer_size = MD5_BUFFER_SIZE;
+ }
+
+ if(buffer_size) {
+ /* compare our computed hash with what we have received */
+
+ if(tvb_bytes_exist(tvb, offset, buffer_size) &&
+ (memcmp(tvb_get_ptr(tvb, offset, buffer_size), digest_buf, buffer_size) != 0)) {
+ proto_item_append_text(pi, " [incorrect, should be ");
+ for(i = 0; i < buffer_size; i++)
+ proto_item_append_text(pi, "%02X", digest_buf[i]);
+
+ proto_item_append_text(pi, "]");
+ }
+ else
+ proto_item_append_text(pi, " [correct]");
+ } else {
+ proto_item_append_text(pi, " [unable to verify]");
+ }
+
+}
/*--- Included file: packet-cms-fn.c ---*/
@@ -231,8 +306,8 @@ dissect_cms_ContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pa
return offset;
}
-static int dissect_contentType1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_cms_ContentType(FALSE, tvb, offset, pinfo, tree, hf_cms_contentType1);
+static int dissect_encryptedContentType(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_cms_ContentType(FALSE, tvb, offset, pinfo, tree, hf_cms_encryptedContentType);
}
@@ -271,9 +346,14 @@ static const ber_sequence_t ContentInfo_sequence[] = {
int
dissect_cms_ContentInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ top_tree = tree;
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
ContentInfo_sequence, hf_index, ett_cms_ContentInfo);
+ content_tvb = NULL;
+ top_tree = NULL;
+
+
return offset;
}
@@ -356,13 +436,16 @@ dissect_cms_T_eContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
gint32 tag;
guint32 len;
int pdu_offset = offset;
+ int content_offset;
/* XXX Do we care about printing out the octet string? */
- offset = dissect_cms_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_cms_eContent);
+ offset = dissect_cms_OCTET_STRING(FALSE, tvb, offset, pinfo, NULL, hf_cms_eContent);
pdu_offset = get_ber_identifier(tvb, pdu_offset, &class, &pc, &tag);
- pdu_offset = get_ber_length(tree, tvb, pdu_offset, &len, &ind);
- pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, pinfo, tree);
+ content_offset = pdu_offset = get_ber_length(tree, tvb, pdu_offset, &len, &ind);
+ pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, pinfo, top_tree ? top_tree : tree);
+
+ content_tvb = tvb_new_subset(tvb, content_offset, len, -1);
return offset;
@@ -393,7 +476,16 @@ static int dissect_encapContentInfo(packet_info *pinfo, proto_tree *tree, tvbuff
static int
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_str(implicit_tag, pinfo, tree, tvb, offset, hf_cms_attrType, &object_identifier_id);
+ char *name = NULL;
+
+ offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_cms_attrType, &object_identifier_id);
+
+
+ if(object_identifier_id) {
+ name = get_ber_oid_name(object_identifier_id);
+ proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id);
+ }
+
return offset;
}
@@ -962,6 +1054,7 @@ dissect_cms_T_keyAttr(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pack
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+
return offset;
}
static int dissect_keyAttr(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1207,7 +1300,7 @@ static int dissect_encryptedContent_impl(packet_info *pinfo, proto_tree *tree, t
static const ber_sequence_t EncryptedContentInfo_sequence[] = {
- { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_contentType1 },
+ { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_encryptedContentType },
{ BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_contentEncryptionAlgorithm },
{ BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_encryptedContent_impl },
{ 0, 0, 0, NULL }
@@ -1371,9 +1464,23 @@ 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,
+ proto_item *pi;
+ int old_offset = offset;
+
+ offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
NULL);
+
+ 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);
+
+
return offset;
}
@@ -1468,7 +1575,6 @@ static void dissect_Countersignature_PDU(tvbuff_t *tvb, packet_info *pinfo, prot
/*--- End of included file: packet-cms-fn.c ---*/
-
/*--- proto_register_cms ----------------------------------------------*/
void proto_register_cms(void) {
@@ -1645,7 +1751,7 @@ void proto_register_cms(void) {
{ "Item", "cms.RecipientInfos_item",
FT_UINT32, BASE_DEC, VALS(cms_RecipientInfo_vals), 0,
"RecipientInfos/_item", HFILL }},
- { &hf_cms_contentType1,
+ { &hf_cms_encryptedContentType,
{ "contentType", "cms.contentType",
FT_STRING, BASE_NONE, NULL, 0,
"EncryptedContentInfo/contentType", HFILL }},
diff --git a/epan/dissectors/packet-ess.c b/epan/dissectors/packet-ess.c
index 65b0e5d523..f80a50f183 100644
--- a/epan/dissectors/packet-ess.c
+++ b/epan/dissectors/packet-ess.c
@@ -63,6 +63,10 @@ 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_RestrictiveTag_PDU = -1; /* RestrictiveTag */
+static int hf_ess_EnumeratedTag_PDU = -1; /* EnumeratedTag */
+static int hf_ess_PermissiveTag_PDU = -1; /* PermissiveTag */
+static int hf_ess_InformativeTag_PDU = -1; /* InformativeTag */
static int hf_ess_EquivalentLabels_PDU = -1; /* EquivalentLabels */
static int hf_ess_MLExpansionHistory_PDU = -1; /* MLExpansionHistory */
static int hf_ess_SigningCertificate_PDU = -1; /* SigningCertificate */
@@ -86,6 +90,14 @@ 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_tagName = -1; /* OBJECT_IDENTIFIER */
+static int hf_ess_attributeFlags = -1; /* BIT_STRING */
+static int hf_ess_attributeList = -1; /* SET_OF_SecurityAttribute */
+static int hf_ess_attributeList_item = -1; /* SecurityAttribute */
+static int hf_ess_attributes = -1; /* FreeFormField */
+static int hf_ess_bitSetAttributes = -1; /* BIT_STRING */
+static int hf_ess_securityAttributes = -1; /* SET_OF_SecurityAttribute */
+static int hf_ess_securityAttributes_item = -1; /* SecurityAttribute */
static int hf_ess_EquivalentLabels_item = -1; /* ESSSecurityLabel */
static int hf_ess_MLExpansionHistory_item = -1; /* MLData */
static int hf_ess_mailListIdentifier = -1; /* EntityIdentifier */
@@ -124,6 +136,12 @@ 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_RestrictiveTag = -1;
+static gint ett_ess_EnumeratedTag = -1;
+static gint ett_ess_SET_OF_SecurityAttribute = -1;
+static gint ett_ess_PermissiveTag = -1;
+static gint ett_ess_InformativeTag = -1;
+static gint ett_ess_FreeFormField = -1;
static gint ett_ess_EquivalentLabels = -1;
static gint ett_ess_MLExpansionHistory = -1;
static gint ett_ess_MLData = -1;
@@ -534,6 +552,155 @@ static int dissect_EquivalentLabels_item(packet_info *pinfo, proto_tree *tree, t
}
+
+static int
+dissect_ess_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_tagName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_ess_tagName);
+}
+
+
+
+static int
+dissect_ess_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
+ NULL, hf_index, -1,
+ NULL);
+
+ return offset;
+}
+static int dissect_attributeFlags(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_ess_attributeFlags);
+}
+static int dissect_bitSetAttributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_BIT_STRING(FALSE, tvb, offset, pinfo, tree, hf_ess_bitSetAttributes);
+}
+
+
+static const ber_sequence_t RestrictiveTag_sequence[] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tagName },
+ { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_attributeFlags },
+ { 0, 0, 0, NULL }
+};
+
+static int
+dissect_ess_RestrictiveTag(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ RestrictiveTag_sequence, hf_index, ett_ess_RestrictiveTag);
+
+ return offset;
+}
+
+
+
+static int
+dissect_ess_SecurityAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ NULL);
+
+ return offset;
+}
+static int dissect_attributeList_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_SecurityAttribute(FALSE, tvb, offset, pinfo, tree, hf_ess_attributeList_item);
+}
+static int dissect_securityAttributes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_SecurityAttribute(FALSE, tvb, offset, pinfo, tree, hf_ess_securityAttributes_item);
+}
+
+
+static const ber_sequence_t SET_OF_SecurityAttribute_set_of[1] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_attributeList_item },
+};
+
+static int
+dissect_ess_SET_OF_SecurityAttribute(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_SecurityAttribute_set_of, hf_index, ett_ess_SET_OF_SecurityAttribute);
+
+ return offset;
+}
+static int dissect_attributeList(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_SET_OF_SecurityAttribute(FALSE, tvb, offset, pinfo, tree, hf_ess_attributeList);
+}
+static int dissect_securityAttributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_SET_OF_SecurityAttribute(FALSE, tvb, offset, pinfo, tree, hf_ess_securityAttributes);
+}
+
+
+static const ber_sequence_t EnumeratedTag_sequence[] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tagName },
+ { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_attributeList },
+ { 0, 0, 0, NULL }
+};
+
+static int
+dissect_ess_EnumeratedTag(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ EnumeratedTag_sequence, hf_index, ett_ess_EnumeratedTag);
+
+ return offset;
+}
+
+
+static const ber_sequence_t PermissiveTag_sequence[] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tagName },
+ { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_attributeFlags },
+ { 0, 0, 0, NULL }
+};
+
+static int
+dissect_ess_PermissiveTag(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ PermissiveTag_sequence, hf_index, ett_ess_PermissiveTag);
+
+ return offset;
+}
+
+
+static const value_string ess_FreeFormField_vals[] = {
+ { 0, "bitSetAttributes" },
+ { 1, "securityAttributes" },
+ { 0, NULL }
+};
+
+static const ber_choice_t FreeFormField_choice[] = {
+ { 0, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_bitSetAttributes },
+ { 1, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_securityAttributes },
+ { 0, 0, 0, 0, NULL }
+};
+
+static int
+dissect_ess_FreeFormField(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,
+ FreeFormField_choice, hf_index, ett_ess_FreeFormField,
+ NULL);
+
+ return offset;
+}
+static int dissect_attributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_ess_FreeFormField(FALSE, tvb, offset, pinfo, tree, hf_ess_attributes);
+}
+
+
+static const ber_sequence_t InformativeTag_sequence[] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_tagName },
+ { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_attributes },
+ { 0, 0, 0, NULL }
+};
+
+static int
+dissect_ess_InformativeTag(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ InformativeTag_sequence, hf_index, ett_ess_InformativeTag);
+
+ return offset;
+}
+
+
static const ber_sequence_t EquivalentLabels_sequence_of[1] = {
{ BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_EquivalentLabels_item },
};
@@ -773,6 +940,18 @@ static void dissect_ContentReference_PDU(tvbuff_t *tvb, packet_info *pinfo, prot
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_RestrictiveTag_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_ess_RestrictiveTag(FALSE, tvb, 0, pinfo, tree, hf_ess_RestrictiveTag_PDU);
+}
+static void dissect_EnumeratedTag_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_ess_EnumeratedTag(FALSE, tvb, 0, pinfo, tree, hf_ess_EnumeratedTag_PDU);
+}
+static void dissect_PermissiveTag_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_ess_PermissiveTag(FALSE, tvb, 0, pinfo, tree, hf_ess_PermissiveTag_PDU);
+}
+static void dissect_InformativeTag_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_ess_InformativeTag(FALSE, tvb, 0, pinfo, tree, hf_ess_InformativeTag_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);
}
@@ -827,6 +1006,22 @@ void proto_register_ess(void) {
{ "ESSSecurityLabel", "ess.ESSSecurityLabel",
FT_NONE, BASE_NONE, NULL, 0,
"ESSSecurityLabel", HFILL }},
+ { &hf_ess_RestrictiveTag_PDU,
+ { "RestrictiveTag", "ess.RestrictiveTag",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "RestrictiveTag", HFILL }},
+ { &hf_ess_EnumeratedTag_PDU,
+ { "EnumeratedTag", "ess.EnumeratedTag",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "EnumeratedTag", HFILL }},
+ { &hf_ess_PermissiveTag_PDU,
+ { "PermissiveTag", "ess.PermissiveTag",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "PermissiveTag", HFILL }},
+ { &hf_ess_InformativeTag_PDU,
+ { "InformativeTag", "ess.InformativeTag",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "InformativeTag", HFILL }},
{ &hf_ess_EquivalentLabels_PDU,
{ "EquivalentLabels", "ess.EquivalentLabels",
FT_UINT32, BASE_DEC, NULL, 0,
@@ -919,6 +1114,38 @@ void proto_register_ess(void) {
{ "value", "ess.value",
FT_NONE, BASE_NONE, NULL, 0,
"SecurityCategory/value", HFILL }},
+ { &hf_ess_tagName,
+ { "tagName", "ess.tagName",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "", HFILL }},
+ { &hf_ess_attributeFlags,
+ { "attributeFlags", "ess.attributeFlags",
+ FT_BYTES, BASE_HEX, NULL, 0,
+ "", HFILL }},
+ { &hf_ess_attributeList,
+ { "attributeList", "ess.attributeList",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "EnumeratedTag/attributeList", HFILL }},
+ { &hf_ess_attributeList_item,
+ { "Item", "ess.attributeList_item",
+ FT_INT32, BASE_DEC, NULL, 0,
+ "EnumeratedTag/attributeList/_item", HFILL }},
+ { &hf_ess_attributes,
+ { "attributes", "ess.attributes",
+ FT_UINT32, BASE_DEC, VALS(ess_FreeFormField_vals), 0,
+ "InformativeTag/attributes", HFILL }},
+ { &hf_ess_bitSetAttributes,
+ { "bitSetAttributes", "ess.bitSetAttributes",
+ FT_BYTES, BASE_HEX, NULL, 0,
+ "FreeFormField/bitSetAttributes", HFILL }},
+ { &hf_ess_securityAttributes,
+ { "securityAttributes", "ess.securityAttributes",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FreeFormField/securityAttributes", HFILL }},
+ { &hf_ess_securityAttributes_item,
+ { "Item", "ess.securityAttributes_item",
+ FT_INT32, BASE_DEC, NULL, 0,
+ "FreeFormField/securityAttributes/_item", HFILL }},
{ &hf_ess_EquivalentLabels_item,
{ "Item", "ess.EquivalentLabels_item",
FT_NONE, BASE_NONE, NULL, 0,
@@ -1019,6 +1246,12 @@ void proto_register_ess(void) {
&ett_ess_ESSPrivacyMark,
&ett_ess_SecurityCategories,
&ett_ess_SecurityCategory,
+ &ett_ess_RestrictiveTag,
+ &ett_ess_EnumeratedTag,
+ &ett_ess_SET_OF_SecurityAttribute,
+ &ett_ess_PermissiveTag,
+ &ett_ess_InformativeTag,
+ &ett_ess_FreeFormField,
&ett_ess_EquivalentLabels,
&ett_ess_MLExpansionHistory,
&ett_ess_MLData,
@@ -1059,6 +1292,11 @@ void proto_reg_handoff_ess(void) {
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");
+ register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.0", dissect_RestrictiveTag_PDU, proto_ess, "id-restrictiveAttributes");
+ register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.1", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedPermissiveAttributes");
+ register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.2", dissect_PermissiveTag_PDU, proto_ess, "id-restrictiveAttributes");
+ register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.3", dissect_InformativeTag_PDU, proto_ess, "id-informativeAttributes");
+ register_ber_oid_dissector("2.16.840.1.101.2.1.8.3.4", dissect_EnumeratedTag_PDU, proto_ess, "id-enumeratedRestrictiveAttributes");
/*--- End of included file: packet-ess-dis-tab.c ---*/
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index fd0ab5806e..bd976a3a19 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -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 */
@@ -57,6 +57,7 @@ int proto_rtse = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
static char object_identifier_id[MAX_OID_STR_LEN];
+static gboolean open_request=FALSE;
/* indirect_reference, used to pick up the signalling so we know what
kind of data is transferred in SES_DATA_TRANSFER_PDUs */
static guint32 indir_ref=0;
@@ -260,9 +261,14 @@ static int dissect_open(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int
static int
dissect_rtse_T61String(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_TeletexString,
+ tvbuff_t *string = NULL;
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+ if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_length(string)));
+
return offset;
}
@@ -274,8 +280,13 @@ static int dissect_t61String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb
static int
dissect_rtse_OCTET_STRING(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);
+ tvbuff_t *string = NULL;
+ offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &string);
+
+ if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_length(string)));
+
return offset;
}
@@ -315,9 +326,14 @@ static int dissect_callingSSuserReference(packet_info *pinfo, proto_tree *tree,
static int
dissect_rtse_CommonReference(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,
+ tvbuff_t *string = NULL;
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+ if(open_request && string && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(string, 0, tvb_length(string)));
+
return offset;
}
@@ -349,9 +365,13 @@ static const ber_sequence_t SessionConnectionIdentifier_sequence[] = {
static int
dissect_rtse_SessionConnectionIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ if(open_request && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Recover");
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
SessionConnectionIdentifier_sequence, hf_index, ett_rtse_SessionConnectionIdentifier);
+
+
return offset;
}
static int dissect_recover_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -421,10 +441,11 @@ dissect_rtse_RTORQapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
if((session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)) != NULL)
session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
-
- offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+ open_request=TRUE;
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
RTORQapdu_set, hf_index, ett_rtse_RTORQapdu);
+ open_request=FALSE;
return offset;
@@ -447,7 +468,7 @@ dissect_rtse_RTOACapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
if((session = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)) != NULL)
session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
- offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
RTOACapdu_set, hf_index, ett_rtse_RTOACapdu);
diff --git a/epan/dissectors/packet-rtse.h b/epan/dissectors/packet-rtse.h
index a60066f714..32e25ebb39 100644
--- a/epan/dissectors/packet-rtse.h
+++ b/epan/dissectors/packet-rtse.h
@@ -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 */
diff --git a/epan/dissectors/packet-s4406.c b/epan/dissectors/packet-s4406.c
index 34c6166e5e..c205ccae4c 100644
--- a/epan/dissectors/packet-s4406.c
+++ b/epan/dissectors/packet-s4406.c
@@ -66,7 +66,8 @@ static int hf_s4406_HandlingInstructions_PDU = -1; /* HandlingInstructions */
static int hf_s4406_MessageInstructions_PDU = -1; /* MessageInstructions */
static int hf_s4406_CodressMessage_PDU = -1; /* CodressMessage */
static int hf_s4406_OriginatorReference_PDU = -1; /* OriginatorReference */
-static int hf_s4406_MMHSPrecedence_PDU = -1; /* MMHSPrecedence */
+static int hf_s4406_PrimaryPrecedence_PDU = -1; /* PrimaryPrecedence */
+static int hf_s4406_CopyPrecedence_PDU = -1; /* CopyPrecedence */
static int hf_s4406_MessageType_PDU = -1; /* MessageType */
static int hf_s4406_AddressListDesignator_PDU = -1; /* AddressListDesignator */
static int hf_s4406_OtherRecipientDesignator_PDU = -1; /* OtherRecipientDesignator */
@@ -74,6 +75,7 @@ static int hf_s4406_PilotInformation_PDU = -1; /* PilotInformation */
static int hf_s4406_Acp127MessageIdentifier_PDU = -1; /* Acp127MessageIdentifier */
static int hf_s4406_OriginatorPlad_PDU = -1; /* OriginatorPlad */
static int hf_s4406_SecurityInformationLabels_PDU = -1; /* SecurityInformationLabels */
+static int hf_s4406_PriorityLevelQualifier_PDU = -1; /* PriorityLevelQualifier */
static int hf_s4406_sics = -1; /* SEQUENCE_OF_Sic */
static int hf_s4406_sics_item = -1; /* Sic */
static int hf_s4406_dist_Extensions = -1; /* SEQUENCE_OF_DistributionExtensionField */
@@ -90,7 +92,7 @@ static int hf_s4406_notificationRequest = -1; /* AddressListRequest */
static int hf_s4406_replyRequest = -1; /* AddressListRequest */
static int hf_s4406_other_recipient_type = -1; /* OtherRecipientType */
static int hf_s4406_designator = -1; /* MilitaryString */
-static int hf_s4406_pilotPrecedence = -1; /* MMHSPrecedence */
+static int hf_s4406_pilotPrecedence = -1; /* PilotPrecedence */
static int hf_s4406_pilotRecipient = -1; /* SEQUENCE_OF_ORDescriptor */
static int hf_s4406_pilotRecipient_item = -1; /* ORDescriptor */
static int hf_s4406_pilotSecurity = -1; /* SecurityLabel */
@@ -222,6 +224,7 @@ static int
dissect_s4406_T_dist_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
/* XXX: not implemented */
+
return offset;
}
static int dissect_dist_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -346,7 +349,7 @@ dissect_s4406_OriginatorReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int
}
-static const value_string s4406_MMHSPrecedence_vals[] = {
+static const value_string s4406_PrimaryPrecedence_vals[] = {
{ 0, "deferred" },
{ 1, "routine" },
{ 2, "priority" },
@@ -361,14 +364,43 @@ static const value_string s4406_MMHSPrecedence_vals[] = {
static int
-dissect_s4406_MMHSPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+dissect_s4406_PrimaryPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ int precedence = -1;
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &precedence);
+
+ if((precedence != -1) && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (primary=%s)", val_to_str(precedence, s4406_PrimaryPrecedence_vals, "precedence(%d)"));
+
return offset;
}
-static int dissect_pilotPrecedence_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_s4406_MMHSPrecedence(TRUE, tvb, offset, pinfo, tree, hf_s4406_pilotPrecedence);
+
+
+static const value_string s4406_CopyPrecedence_vals[] = {
+ { 0, "deferred" },
+ { 1, "routine" },
+ { 2, "priority" },
+ { 3, "immediate" },
+ { 4, "flash" },
+ { 5, "override" },
+ { 16, "ecp" },
+ { 17, "critic" },
+ { 18, "override" },
+ { 0, NULL }
+};
+
+
+static int
+dissect_s4406_CopyPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ int precedence = -1;
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &precedence);
+
+ if((precedence != -1) && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (copy=%s)", val_to_str(precedence, s4406_CopyPrecedence_vals, "precedence(%d)"));
+
+ return offset;
}
@@ -513,6 +545,32 @@ dissect_s4406_OtherRecipientDesignator(gboolean implicit_tag _U_, tvbuff_t *tvb,
}
+static const value_string s4406_PilotPrecedence_vals[] = {
+ { 0, "deferred" },
+ { 1, "routine" },
+ { 2, "priority" },
+ { 3, "immediate" },
+ { 4, "flash" },
+ { 5, "override" },
+ { 16, "ecp" },
+ { 17, "critic" },
+ { 18, "override" },
+ { 0, NULL }
+};
+
+
+static int
+dissect_s4406_PilotPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ NULL);
+
+ return offset;
+}
+static int dissect_pilotPrecedence_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_s4406_PilotPrecedence(TRUE, tvb, offset, pinfo, tree, hf_s4406_pilotPrecedence);
+}
+
+
static const ber_sequence_t SEQUENCE_OF_ORDescriptor_sequence_of[1] = {
{ BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_pilotRecipient_item },
};
@@ -642,6 +700,22 @@ dissect_s4406_SecurityInformationLabels(gboolean implicit_tag _U_, tvbuff_t *tvb
return offset;
}
+
+static const value_string s4406_PriorityLevelQualifier_vals[] = {
+ { 0, "low" },
+ { 1, "high" },
+ { 0, NULL }
+};
+
+
+static int
+dissect_s4406_PriorityLevelQualifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ NULL);
+
+ return offset;
+}
+
/*--- PDUs ---*/
static void dissect_ExemptedAddress_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
@@ -665,8 +739,11 @@ static void dissect_CodressMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_
static void dissect_OriginatorReference_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_s4406_OriginatorReference(FALSE, tvb, 0, pinfo, tree, hf_s4406_OriginatorReference_PDU);
}
-static void dissect_MMHSPrecedence_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
- dissect_s4406_MMHSPrecedence(FALSE, tvb, 0, pinfo, tree, hf_s4406_MMHSPrecedence_PDU);
+static void dissect_PrimaryPrecedence_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_s4406_PrimaryPrecedence(FALSE, tvb, 0, pinfo, tree, hf_s4406_PrimaryPrecedence_PDU);
+}
+static void dissect_CopyPrecedence_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_s4406_CopyPrecedence(FALSE, tvb, 0, pinfo, tree, hf_s4406_CopyPrecedence_PDU);
}
static void dissect_MessageType_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_s4406_MessageType(FALSE, tvb, 0, pinfo, tree, hf_s4406_MessageType_PDU);
@@ -689,6 +766,9 @@ static void dissect_OriginatorPlad_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_
static void dissect_SecurityInformationLabels_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_s4406_SecurityInformationLabels(FALSE, tvb, 0, pinfo, tree, hf_s4406_SecurityInformationLabels_PDU);
}
+static void dissect_PriorityLevelQualifier_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_s4406_PriorityLevelQualifier(FALSE, tvb, 0, pinfo, tree, hf_s4406_PriorityLevelQualifier_PDU);
+}
/*--- End of included file: packet-s4406-fn.c ---*/
@@ -757,10 +837,14 @@ void proto_register_s4406(void) {
{ "OriginatorReference", "s4406.OriginatorReference",
FT_STRING, BASE_NONE, NULL, 0,
"OriginatorReference", HFILL }},
- { &hf_s4406_MMHSPrecedence_PDU,
- { "MMHSPrecedence", "s4406.MMHSPrecedence",
- FT_INT32, BASE_DEC, VALS(s4406_MMHSPrecedence_vals), 0,
- "MMHSPrecedence", HFILL }},
+ { &hf_s4406_PrimaryPrecedence_PDU,
+ { "PrimaryPrecedence", "s4406.PrimaryPrecedence",
+ FT_INT32, BASE_DEC, VALS(s4406_PrimaryPrecedence_vals), 0,
+ "PrimaryPrecedence", HFILL }},
+ { &hf_s4406_CopyPrecedence_PDU,
+ { "CopyPrecedence", "s4406.CopyPrecedence",
+ FT_INT32, BASE_DEC, VALS(s4406_CopyPrecedence_vals), 0,
+ "CopyPrecedence", HFILL }},
{ &hf_s4406_MessageType_PDU,
{ "MessageType", "s4406.MessageType",
FT_NONE, BASE_NONE, NULL, 0,
@@ -789,6 +873,10 @@ void proto_register_s4406(void) {
{ "SecurityInformationLabels", "s4406.SecurityInformationLabels",
FT_NONE, BASE_NONE, NULL, 0,
"SecurityInformationLabels", HFILL }},
+ { &hf_s4406_PriorityLevelQualifier_PDU,
+ { "PriorityLevelQualifier", "s4406.PriorityLevelQualifier",
+ FT_UINT32, BASE_DEC, VALS(s4406_PriorityLevelQualifier_vals), 0,
+ "PriorityLevelQualifier", HFILL }},
{ &hf_s4406_sics,
{ "sics", "s4406.sics",
FT_UINT32, BASE_DEC, NULL, 0,
@@ -855,7 +943,7 @@ void proto_register_s4406(void) {
"OtherRecipientDesignator/designator", HFILL }},
{ &hf_s4406_pilotPrecedence,
{ "pilotPrecedence", "s4406.pilotPrecedence",
- FT_INT32, BASE_DEC, VALS(s4406_MMHSPrecedence_vals), 0,
+ FT_INT32, BASE_DEC, VALS(s4406_PilotPrecedence_vals), 0,
"PilotInformation/pilotPrecedence", HFILL }},
{ &hf_s4406_pilotRecipient,
{ "pilotRecipient", "s4406.pilotRecipient",
@@ -947,8 +1035,8 @@ void proto_reg_handoff_s4406(void) {
/*--- Included file: packet-s4406-dis-tab.c ---*/
- register_ber_oid_dissector("1.3.26.0.4406.0.2.0", dissect_MMHSPrecedence_PDU, proto_s4406, "primary-precedence");
- register_ber_oid_dissector("1.3.26.0.4406.0.2.1", dissect_MMHSPrecedence_PDU, proto_s4406, "copy-precedence");
+ register_ber_oid_dissector("1.3.26.0.4406.0.2.0", dissect_PrimaryPrecedence_PDU, proto_s4406, "primary-precedence");
+ register_ber_oid_dissector("1.3.26.0.4406.0.2.1", dissect_CopyPrecedence_PDU, proto_s4406, "copy-precedence");
register_ber_oid_dissector("1.3.26.0.4406.0.2.2", dissect_MessageType_PDU, proto_s4406, "message-type");
register_ber_oid_dissector("1.3.26.0.4406.0.2.3", dissect_AddressListDesignator_PDU, proto_s4406, "address-list-indicator");
register_ber_oid_dissector("1.3.26.0.4406.0.2.4", dissect_ExemptedAddress_PDU, proto_s4406, "exempted-address");
@@ -963,6 +1051,7 @@ void proto_reg_handoff_s4406(void) {
register_ber_oid_dissector("1.3.26.0.4406.0.2.13", dissect_Acp127MessageIdentifier_PDU, proto_s4406, "acp127-message-identifierr");
register_ber_oid_dissector("1.3.26.0.4406.0.2.14", dissect_OriginatorPlad_PDU, proto_s4406, "originator-plad");
register_ber_oid_dissector("1.3.26.0.4406.0.2.17", dissect_SecurityInformationLabels_PDU, proto_s4406, "information-labels");
+ register_ber_oid_dissector("1.3.26.0.4406.0.8.0", dissect_PriorityLevelQualifier_PDU, proto_s4406, "priority-level-qualifier");
/*--- End of included file: packet-s4406-dis-tab.c ---*/
diff --git a/epan/dissectors/packet-s5066.c b/epan/dissectors/packet-s5066.c
index 568e1e5ca1..a9e3da8d0c 100644
--- a/epan/dissectors/packet-s5066.c
+++ b/epan/dissectors/packet-s5066.c
@@ -641,7 +641,7 @@ proto_register_s5066(void)
{ "Number of errored blocks", "s5066.21.err_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }
},
{ &hf_s5066_21_nrx_blocks,
- { "Number of non-received blocks", "s5066.21.nrx_blocks", FT_UINT16, BASE_DEC, NULL, 0x0F, "", HFILL }
+ { "Number of non-received blocks", "s5066.21.nrx_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }
},
/* Type 22: S_UNIDATA_REQUEST_CONFIRM */
{ &hf_s5066_22_unused,
@@ -702,7 +702,7 @@ proto_register_s5066(void)
{ "Number of errored blocks", "s5066.25.err_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }
},
{ &hf_s5066_25_nrx_blocks,
- { "Number of non-received blocks", "s5066.25.nrx_blocks", FT_UINT16, BASE_DEC, NULL, 0x0F, "", HFILL }
+ { "Number of non-received blocks", "s5066.25.nrx_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }
},
/* Type 26: S_EXPEDITED_UNIDATA_REQUEST_CONFIRM */
{ &hf_s5066_26_unused,
diff --git a/epan/dissectors/packet-x411.c b/epan/dissectors/packet-x411.c
index de8f7231f6..0b4ee643d6 100644
--- a/epan/dissectors/packet-x411.c
+++ b/epan/dissectors/packet-x411.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x411.c */
+/* .\packet-x411.c */
/* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
/* Input file: packet-x411-template.c */
@@ -62,8 +62,14 @@
int proto_x411 = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
-static int extension_id = 0; /* integer extension id */
-static const char *object_identifier_id; /* content type identifier */
+static int extension_id = -1; /* integer extension id */
+static char *object_identifier_id; /* extensions identifier */
+static char *content_type_id; /* content type identifier */
+
+#define MAX_ORA_STR_LEN 256
+static char *oraddress = NULL;
+static gboolean doing_address=FALSE;
+static proto_item *address_item;
static proto_tree *top_tree=NULL;
@@ -720,15 +726,23 @@ static int dissect_empty_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *
static int
dissect_x411_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- tvbuff_t *mtaname;
+ tvbuff_t *mtaname = NULL;
offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
pinfo, tree, tvb, offset, hf_index,
&mtaname);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_get_string(mtaname, 0, tvb_length(mtaname)));
+ if(doing_address) {
+
+ proto_item_append_text(address_item, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+
+ } else {
+
+ if (check_col(pinfo->cinfo, COL_INFO) && mtaname) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+ }
+
}
@@ -905,7 +919,11 @@ static int dissect_privacy_mark(packet_info *pinfo, proto_tree *tree, tvbuff_t *
static int
dissect_x411_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_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
+
+ extension_id = -1;
+
return offset;
}
@@ -1112,8 +1130,14 @@ static const value_string x411_MTABindError_vals[] = {
static int
dissect_x411_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ int error = -1;
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &error);
+
+ if((error != -1) && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str(error, x411_MTABindError_vals, "error(%d)"));
+
+
return offset;
}
@@ -1122,9 +1146,16 @@ dissect_x411_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
static int
dissect_x411_NumericString(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_NumericString,
+ tvbuff_t *nstring = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &nstring);
+
+
+ if(doing_address && nstring)
+ g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
+
return offset;
}
@@ -1151,9 +1182,29 @@ static int dissect_sub_address_impl(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_PrintableString(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_PrintableString,
+ tvbuff_t *pstring = NULL;
+ char *fmt = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &pstring);
+
+
+ if(doing_address && pstring) {
+ if(hf_index == hf_x411_printable_surname) fmt = "/S=";
+ else if(hf_index == hf_x411_printable_given_name) fmt = "/G=";
+ else if(hf_index == hf_x411_printable_initials) fmt = "/I=";
+ else if(hf_index == hf_x411_printable_generation_qualifier) fmt = "/GQ=";
+ else if(hf_index == hf_x411_printable_type) fmt = "/DD.";
+ else if(hf_index == hf_x411_printable_value) fmt = "=";
+
+ if(fmt)
+ g_strlcat(oraddress, fmt, MAX_ORA_STR_LEN);
+
+ g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
+
+ }
+
return offset;
}
@@ -1224,10 +1275,16 @@ dissect_x411_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, p
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
+
+ if(doing_address)
+ g_strlcat(oraddress, "/C=", MAX_ORA_STR_LEN);
+
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
CountryName_choice, hf_index, ett_x411_CountryName, NULL);
+
+
return offset;
}
static int dissect_country_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1262,6 +1319,9 @@ dissect_x411_AdministrationDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb,
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
+ if(doing_address)
+ g_strlcat(oraddress, "/A=", MAX_ORA_STR_LEN);
+
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
AdministrationDomainName_choice, hf_index, ett_x411_AdministrationDomainName, NULL);
@@ -1290,10 +1350,16 @@ static const ber_choice_t PrivateDomainIdentifier_choice[] = {
static int
dissect_x411_PrivateDomainIdentifier(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,
+
+ if(doing_address)
+ g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
+
+ offset = dissect_ber_choice(pinfo, tree, tvb, offset,
PrivateDomainIdentifier_choice, hf_index, ett_x411_PrivateDomainIdentifier,
NULL);
+
+
return offset;
}
static int dissect_private_domain_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1313,9 +1379,19 @@ static const ber_sequence_t GlobalDomainIdentifier_sequence[] = {
static int
dissect_x411_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
+ address_item = tree;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
GlobalDomainIdentifier_sequence, hf_index, ett_x411_GlobalDomainIdentifier);
+
+ if(*oraddress)
+ proto_item_append_text(address_item, " (%s/", oraddress);
+
+
+
return offset;
}
static int dissect_global_domain_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1332,9 +1408,16 @@ static int dissect_attempted_domain(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_LocalIdentifier(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_IA5String,
+ tvbuff_t *id = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &id);
+
+
+ if(doing_address && id)
+ proto_item_append_text(address_item, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
+
return offset;
}
@@ -1351,9 +1434,16 @@ static const ber_sequence_t MTSIdentifier_sequence[] = {
static int
dissect_x411_MTSIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ doing_address = TRUE;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
MTSIdentifier_sequence, hf_index, ett_x411_MTSIdentifier);
+
+ doing_address = FALSE;
+
+
return offset;
}
@@ -1373,9 +1463,19 @@ static int dissect_message_identifier(packet_info *pinfo, proto_tree *tree, tvbu
static int
dissect_x411_X121Address(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_NumericString,
+ tvbuff_t *string = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+
+ if(doing_address && string) {
+ g_strlcat(oraddress, "/X121=", MAX_ORA_STR_LEN);
+ g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
+ }
+
+
return offset;
}
@@ -1396,9 +1496,18 @@ static int dissect_network_address_impl(packet_info *pinfo, proto_tree *tree, tv
static int
dissect_x411_TerminalIdentifier(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_PrintableString,
+ tvbuff_t *string = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+
+ if(doing_address && string) {
+ g_strlcat(oraddress, "/UA-ID=", MAX_ORA_STR_LEN);
+ g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
+ }
+
return offset;
}
@@ -1421,10 +1530,16 @@ static const ber_choice_t PrivateDomainName_choice[] = {
static int
dissect_x411_PrivateDomainName(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,
+
+ if(doing_address)
+ g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
+
+ offset = dissect_ber_choice(pinfo, tree, tvb, offset,
PrivateDomainName_choice, hf_index, ett_x411_PrivateDomainName,
NULL);
+
+
return offset;
}
static int dissect_private_domain_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1435,9 +1550,18 @@ static int dissect_private_domain_name_impl(packet_info *pinfo, proto_tree *tree
static int
dissect_x411_OrganizationName(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_PrintableString,
+ tvbuff_t *string = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+
+ if(doing_address && string) {
+ g_strlcat(oraddress, "/O=", MAX_ORA_STR_LEN);
+ g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
+ }
+
return offset;
}
@@ -1525,9 +1649,14 @@ static const ber_sequence_t BuiltInStandardAttributes_sequence[] = {
static int
dissect_x411_BuiltInStandardAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ address_item = tree;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
BuiltInStandardAttributes_sequence, hf_index, ett_x411_BuiltInStandardAttributes);
+
+
return offset;
}
static int dissect_built_in_standard_attributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1649,9 +1778,21 @@ static const ber_sequence_t ORName_sequence[] = {
int
dissect_x411_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
+ address_item = NULL;
+ doing_address = TRUE;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
ORName_sequence, hf_index, ett_x411_ORName);
+
+ if(*oraddress && address_item)
+ proto_item_append_text(address_item, " (%s/)", oraddress);
+
+ doing_address = FALSE;
+
+
return offset;
}
static int dissect_exact_match_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1768,10 +1909,18 @@ static int dissect_g3_facsimile_impl(packet_info *pinfo, proto_tree *tree, tvbuf
static int
dissect_x411_TeletexString(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_TeletexString,
+ tvbuff_t *tstring = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
pinfo, tree, tvb, offset, hf_index,
NULL);
+
+ if(doing_address && tstring)
+ g_strlcat(oraddress, tvb_format_text(tstring, 0, tvb_length(tstring)), MAX_ORA_STR_LEN);
+
+
+
return offset;
}
static int dissect_teletex_surname_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -1944,7 +2093,19 @@ static int dissect_built_in_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t
static int
dissect_x411_ExtendedContentType(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_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
+ char *name = NULL;
+
+ offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &content_type_id);
+
+
+ if(content_type_id) {
+ name = get_ber_oid_name(content_type_id);
+
+ if(!name) name = content_type_id;
+
+ proto_item_append_text(tree, " (%s)", name);
+ }
+
return offset;
}
@@ -2071,9 +2232,16 @@ static int dissect_per_message_indicators(packet_info *pinfo, proto_tree *tree,
static int
dissect_x411_Time(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,
+ tvbuff_t *arrival = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &arrival);
+
+
+ if(arrival)
+ proto_item_append_text(address_item, " %s", tvb_format_text(arrival, 0, tvb_length(arrival)));
+
return offset;
}
@@ -2198,8 +2366,14 @@ static const value_string x411_RoutingAction_vals[] = {
static int
dissect_x411_RoutingAction(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
- NULL);
+ int action = 0;
+
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ &action);
+
+
+ proto_item_append_text(address_item, " %s", val_to_str(action, x411_RoutingAction_vals, "action(%d)"));
+
return offset;
}
@@ -2266,9 +2440,17 @@ static const ber_sequence_t DomainSuppliedInformation_set[] = {
static int
dissect_x411_DomainSuppliedInformation(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,
+
+ doing_address = FALSE;
+
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
DomainSuppliedInformation_set, hf_index, ett_x411_DomainSuppliedInformation);
+
+ doing_address = TRUE;
+ proto_item_append_text(tree, ")");
+
+
return offset;
}
static int dissect_domain_supplied_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -2284,9 +2466,16 @@ static const ber_sequence_t TraceInformationElement_sequence[] = {
static int
dissect_x411_TraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ doing_address = TRUE;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
TraceInformationElement_sequence, hf_index, ett_x411_TraceInformationElement);
+
+ doing_address = FALSE;
+
+
return offset;
}
static int dissect_TraceInformation_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -2358,8 +2547,16 @@ static int dissect_criticality_impl(packet_info *pinfo, proto_tree *tree, tvbuff
static int
dissect_x411_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-
- offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
+ char *name;
+
+ if(extension_id != -1)
+ offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
+ else if(object_identifier_id) {
+ call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ name = get_ber_oid_name(object_identifier_id);
+ proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id);
+ }
+
return offset;
@@ -2555,10 +2752,10 @@ dissect_x411_Content(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packe
tvbuff_t *next_tvb;
/* we can do this now constructed octet strings are supported */
- offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(FALSE, pinfo, NULL, tvb, offset, hf_index, &next_tvb);
- if (next_tvb)
- (void) call_ber_oid_callback(object_identifier_id, next_tvb, 0, pinfo, top_tree ? top_tree : tree);
+ if (next_tvb && content_type_id)
+ (void) call_ber_oid_callback(content_type_id, next_tvb, 0, pinfo, top_tree ? top_tree : tree);
return offset;
@@ -3226,9 +3423,17 @@ static const ber_sequence_t MTASuppliedInformation_set[] = {
static int
dissect_x411_MTASuppliedInformation(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,
+
+ doing_address = FALSE;
+
+ offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
MTASuppliedInformation_set, hf_index, ett_x411_MTASuppliedInformation);
+
+ doing_address = TRUE;
+ proto_item_append_text(tree, ")");
+
+
return offset;
}
static int dissect_mta_supplied_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -3245,9 +3450,17 @@ static const ber_sequence_t InternalTraceInformationElement_sequence[] = {
static int
dissect_x411_InternalTraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ doing_address = TRUE;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
InternalTraceInformationElement_sequence, hf_index, ett_x411_InternalTraceInformationElement);
+
+ doing_address = FALSE;
+
+
+
return offset;
}
static int dissect_InternalTraceInformation_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -5142,9 +5355,21 @@ static const ber_sequence_t ORAddress_sequence[] = {
static int
dissect_x411_ORAddress(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
- offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+
+ oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';
+ doing_address = TRUE;
+ address_item = NULL;
+
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
ORAddress_sequence, hf_index, ett_x411_ORAddress);
+
+ if(*oraddress && address_item)
+ proto_item_append_text(address_item, " %s/", oraddress);
+
+ doing_address = FALSE;
+
+
return offset;
}
@@ -5637,9 +5862,20 @@ dissect_x411_CertificateSelectors(gboolean implicit_tag _U_, tvbuff_t *tvb, int
static int
dissect_x411_CommonName(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_PrintableString,
+ tvbuff_t *string = NULL;
+
+ offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
pinfo, tree, tvb, offset, hf_index,
- NULL);
+ &string);
+
+
+ if(doing_address && string) {
+ g_strlcat(oraddress, "/CN=", MAX_ORA_STR_LEN);
+ g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
+ }
+
+
+
return offset;
}
diff --git a/epan/dissectors/packet-x411.h b/epan/dissectors/packet-x411.h
index 4477b3c394..cde0bd7408 100644
--- a/epan/dissectors/packet-x411.h
+++ b/epan/dissectors/packet-x411.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x411.h */
+/* .\packet-x411.h */
/* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
/* Input file: packet-x411-template.h */
diff --git a/epan/dissectors/packet-x509af.c b/epan/dissectors/packet-x509af.c
index 81a0ced855..07fc887feb 100644
--- a/epan/dissectors/packet-x509af.c
+++ b/epan/dissectors/packet-x509af.c
@@ -62,19 +62,21 @@ static int hf_x509af_Certificate_PDU = -1; /* Certificate */
static int hf_x509af_CertificatePair_PDU = -1; /* CertificatePair */
static int hf_x509af_CertificateList_PDU = -1; /* CertificateList */
static int hf_x509af_AttributeCertificate_PDU = -1; /* AttributeCertificate */
+static int hf_x509af_DSS_Params_PDU = -1; /* DSS_Params */
static int hf_x509af_signedCertificate = -1; /* T_signedCertificate */
static int hf_x509af_version = -1; /* Version */
static int hf_x509af_serialNumber = -1; /* CertificateSerialNumber */
static int hf_x509af_signature = -1; /* AlgorithmIdentifier */
static int hf_x509af_issuer = -1; /* Name */
static int hf_x509af_validity = -1; /* Validity */
-static int hf_x509af_subject = -1; /* Name */
+static int hf_x509af_subject = -1; /* SubjectName */
static int hf_x509af_subjectPublicKeyInfo = -1; /* SubjectPublicKeyInfo */
static int hf_x509af_issuerUniqueIdentifier = -1; /* UniqueIdentifier */
static int hf_x509af_subjectUniqueIdentifier = -1; /* UniqueIdentifier */
static int hf_x509af_extensions = -1; /* Extensions */
static int hf_x509af_algorithmIdentifier = -1; /* AlgorithmIdentifier */
static int hf_x509af_encrypted = -1; /* BIT_STRING */
+static int hf_x509af_rdnSequence = -1; /* RDNSequence */
static int hf_x509af_algorithmId = -1; /* T_algorithmId */
static int hf_x509af_parameters = -1; /* T_parameters */
static int hf_x509af_notBefore = -1; /* Time */
@@ -122,11 +124,14 @@ static int hf_x509af_issuerUID = -1; /* UniqueIdentifier */
static int hf_x509af_notBeforeTime = -1; /* GeneralizedTime */
static int hf_x509af_notAfterTime = -1; /* GeneralizedTime */
static int hf_x509af_assertion_subject = -1; /* AssertionSubject */
-static int hf_x509af_assertionSubjectName = -1; /* Name */
+static int hf_x509af_assertionSubjectName = -1; /* SubjectName */
static int hf_x509af_assertionIssuer = -1; /* Name */
static int hf_x509af_attCertValidity = -1; /* GeneralizedTime */
static int hf_x509af_attType = -1; /* SET_OF_AttributeType */
static int hf_x509af_attType_item = -1; /* AttributeType */
+static int hf_x509af_p = -1; /* INTEGER */
+static int hf_x509af_q = -1; /* INTEGER */
+static int hf_x509af_g = -1; /* INTEGER */
/*--- End of included file: packet-x509af-hf.c ---*/
@@ -138,6 +143,7 @@ static gint ett_pkix_crl = -1;
static gint ett_x509af_Certificate = -1;
static gint ett_x509af_T_signedCertificate = -1;
+static gint ett_x509af_SubjectName = -1;
static gint ett_x509af_AlgorithmIdentifier = -1;
static gint ett_x509af_Validity = -1;
static gint ett_x509af_SubjectPublicKeyInfo = -1;
@@ -166,17 +172,15 @@ static gint ett_x509af_AttCertValidityPeriod = -1;
static gint ett_x509af_AttributeCertificateAssertion = -1;
static gint ett_x509af_AssertionSubject = -1;
static gint ett_x509af_SET_OF_AttributeType = -1;
+static gint ett_x509af_DSS_Params = -1;
/*--- End of included file: packet-x509af-ett.c ---*/
static const char *algorithm_id;
-
-
static const char *extension_id;
-
/*--- Included file: packet-x509af-fn.c ---*/
/*--- Fields for imported types ---*/
@@ -184,15 +188,15 @@ static const char *extension_id;
static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509if_Name(FALSE, tvb, offset, pinfo, tree, hf_x509af_issuer);
}
-static int dissect_subject(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509if_Name(FALSE, tvb, offset, pinfo, tree, hf_x509af_subject);
-}
static int dissect_issuerUniqueIdentifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509sat_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x509af_issuerUniqueIdentifier);
}
static int dissect_subjectUniqueIdentifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509sat_UniqueIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x509af_subjectUniqueIdentifier);
}
+static int dissect_rdnSequence(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509if_RDNSequence(FALSE, tvb, offset, pinfo, tree, hf_x509af_rdnSequence);
+}
static int dissect_infoSubjectName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509ce_GeneralNames(FALSE, tvb, offset, pinfo, tree, hf_x509af_infoSubjectName);
}
@@ -208,9 +212,6 @@ static int dissect_issuerUniqueID(packet_info *pinfo, proto_tree *tree, tvbuff_t
static int dissect_issuerUID(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509sat_UniqueIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x509af_issuerUID);
}
-static int dissect_assertionSubjectName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509if_Name(FALSE, tvb, offset, pinfo, tree, hf_x509af_assertionSubjectName);
-}
static int dissect_assertionIssuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509if_Name(FALSE, tvb, offset, pinfo, tree, hf_x509af_assertionIssuer);
}
@@ -261,7 +262,17 @@ static int dissect_serial(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, i
static int
dissect_x509af_T_algorithmId(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_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id);
+ char *name;
+
+ offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id);
+
+
+ if(algorithm_id) {
+ name = get_ber_oid_name(algorithm_id);
+
+ proto_item_append_text(tree, " (%s)", name ? name : algorithm_id);
+ }
+
return offset;
}
@@ -397,6 +408,37 @@ static int dissect_validity(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
}
+static const value_string x509af_SubjectName_vals[] = {
+ { 0, "rdnSequence" },
+ { 0, NULL }
+};
+
+static const ber_choice_t SubjectName_choice[] = {
+ { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rdnSequence },
+ { 0, 0, 0, 0, NULL }
+};
+
+static int
+dissect_x509af_SubjectName(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,
+ SubjectName_choice, hf_index, ett_x509af_SubjectName,
+ NULL);
+
+
+ proto_item_append_text(proto_item_get_parent(tree), " (%s)", x509if_get_last_dn());
+
+
+ return offset;
+}
+static int dissect_subject(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509af_SubjectName(FALSE, tvb, offset, pinfo, tree, hf_x509af_subject);
+}
+static int dissect_assertionSubjectName(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509af_SubjectName(FALSE, tvb, offset, pinfo, tree, hf_x509af_assertionSubjectName);
+}
+
+
static int
dissect_x509af_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
@@ -435,7 +477,17 @@ static int dissect_subjectPublicKeyInfo(packet_info *pinfo, proto_tree *tree, tv
static int
dissect_x509af_T_extnId(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_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_extension_id, &extension_id);
+ char *name;
+
+ offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_extension_id, &extension_id);
+
+
+ if(extension_id) {
+ name = get_ber_oid_name(extension_id);
+
+ proto_item_append_text(tree, " (%s)", name ? name : extension_id);
+ }
+
return offset;
}
@@ -523,7 +575,7 @@ static const ber_sequence_t T_signedCertificate_sequence[] = {
{ BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_signature },
{ BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer },
{ BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_validity },
- { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_subject },
+ { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_subject },
{ BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_subjectPublicKeyInfo },
{ BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_issuerUniqueIdentifier_impl },
{ BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subjectUniqueIdentifier_impl },
@@ -972,6 +1024,41 @@ dissect_x509af_AttributeCertificateAssertion(gboolean implicit_tag _U_, tvbuff_t
return offset;
}
+
+
+static int
+dissect_x509af_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ NULL);
+
+ return offset;
+}
+static int dissect_p(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509af_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_x509af_p);
+}
+static int dissect_q(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509af_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_x509af_q);
+}
+static int dissect_g(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509af_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_x509af_g);
+}
+
+
+static const ber_sequence_t DSS_Params_sequence[] = {
+ { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_p },
+ { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_q },
+ { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_g },
+ { 0, 0, 0, NULL }
+};
+
+static int
+dissect_x509af_DSS_Params(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
+ DSS_Params_sequence, hf_index, ett_x509af_DSS_Params);
+
+ return offset;
+}
+
/*--- PDUs ---*/
static void dissect_Certificate_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
@@ -986,11 +1073,18 @@ static void dissect_CertificateList_PDU(tvbuff_t *tvb, packet_info *pinfo, proto
static void dissect_AttributeCertificate_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_x509af_AttributeCertificate(FALSE, tvb, 0, pinfo, tree, hf_x509af_AttributeCertificate_PDU);
}
+static void dissect_DSS_Params_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509af_DSS_Params(FALSE, tvb, 0, pinfo, tree, hf_x509af_DSS_Params_PDU);
+}
/*--- End of included file: packet-x509af-fn.c ---*/
+char *x509af_get_last_algorithm_id() {
+ return algorithm_id;
+}
+
static int
dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
@@ -1048,6 +1142,10 @@ void proto_register_x509af(void) {
{ "AttributeCertificate", "x509af.AttributeCertificate",
FT_NONE, BASE_NONE, NULL, 0,
"AttributeCertificate", HFILL }},
+ { &hf_x509af_DSS_Params_PDU,
+ { "DSS-Params", "x509af.DSS_Params",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "DSS-Params", HFILL }},
{ &hf_x509af_signedCertificate,
{ "signedCertificate", "x509af.signedCertificate",
FT_NONE, BASE_NONE, NULL, 0,
@@ -1074,7 +1172,7 @@ void proto_register_x509af(void) {
"Certificate/signedCertificate/validity", HFILL }},
{ &hf_x509af_subject,
{ "subject", "x509af.subject",
- FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
+ FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"Certificate/signedCertificate/subject", HFILL }},
{ &hf_x509af_subjectPublicKeyInfo,
{ "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
@@ -1100,6 +1198,10 @@ void proto_register_x509af(void) {
{ "encrypted", "x509af.encrypted",
FT_BYTES, BASE_HEX, NULL, 0,
"", HFILL }},
+ { &hf_x509af_rdnSequence,
+ { "rdnSequence", "x509af.rdnSequence",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "SubjectName/rdnSequence", HFILL }},
{ &hf_x509af_algorithmId,
{ "algorithmId", "x509af.algorithmId",
FT_STRING, BASE_NONE, NULL, 0,
@@ -1290,7 +1392,7 @@ void proto_register_x509af(void) {
"AttributeCertificateAssertion/subject", HFILL }},
{ &hf_x509af_assertionSubjectName,
{ "subjectName", "x509af.subjectName",
- FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
+ FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"AttributeCertificateAssertion/subject/subjectName", HFILL }},
{ &hf_x509af_assertionIssuer,
{ "issuer", "x509af.issuer",
@@ -1308,6 +1410,18 @@ void proto_register_x509af(void) {
{ "Item", "x509af.attType_item",
FT_STRING, BASE_NONE, NULL, 0,
"AttributeCertificateAssertion/attType/_item", HFILL }},
+ { &hf_x509af_p,
+ { "p", "x509af.p",
+ FT_INT32, BASE_DEC, NULL, 0,
+ "DSS-Params/p", HFILL }},
+ { &hf_x509af_q,
+ { "q", "x509af.q",
+ FT_INT32, BASE_DEC, NULL, 0,
+ "DSS-Params/q", HFILL }},
+ { &hf_x509af_g,
+ { "g", "x509af.g",
+ FT_INT32, BASE_DEC, NULL, 0,
+ "DSS-Params/g", HFILL }},
/*--- End of included file: packet-x509af-hfarr.c ---*/
@@ -1321,6 +1435,7 @@ void proto_register_x509af(void) {
&ett_x509af_Certificate,
&ett_x509af_T_signedCertificate,
+ &ett_x509af_SubjectName,
&ett_x509af_AlgorithmIdentifier,
&ett_x509af_Validity,
&ett_x509af_SubjectPublicKeyInfo,
@@ -1349,6 +1464,7 @@ void proto_register_x509af(void) {
&ett_x509af_AttributeCertificateAssertion,
&ett_x509af_AssertionSubject,
&ett_x509af_SET_OF_AttributeType,
+ &ett_x509af_DSS_Params,
/*--- End of included file: packet-x509af-ettarr.c ---*/
@@ -1381,6 +1497,7 @@ void proto_reg_handoff_x509af(void) {
register_ber_oid_dissector("2.5.4.40", dissect_CertificatePair_PDU, proto_x509af, "id-at-crossCertificatePair");
register_ber_oid_dissector("2.5.4.58", dissect_AttributeCertificate_PDU, proto_x509af, "id-at-attributeCertificate");
register_ber_oid_dissector("2.5.4.59", dissect_CertificateList_PDU, proto_x509af, "id-at-attributeCertificateRevocationList");
+ register_ber_oid_dissector("1.2.840.10040.4.1", dissect_DSS_Params_PDU, proto_x509af, "id-dsa");
/*--- End of included file: packet-x509af-dis-tab.c ---*/
diff --git a/epan/dissectors/packet-x509af.h b/epan/dissectors/packet-x509af.h
index 226ef584f3..ad6f0fe6f2 100644
--- a/epan/dissectors/packet-x509af.h
+++ b/epan/dissectors/packet-x509af.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x509af.h */
+/* .\packet-x509af.h */
/* ../../tools/asn2eth.py -X -b -e -p x509af -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn */
/* Input file: packet-x509af-template.h */
@@ -64,5 +64,7 @@ int dissect_x509af_AttributeCertificateAssertion(gboolean implicit_tag, tvbuff_t
/*--- End of included file: packet-x509af-exp.h ---*/
+extern char* x509af_get_last_algorithm_id();
+
#endif /* PACKET_X509AF_H */
diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c
index 8422135071..8f73c40437 100644
--- a/epan/dissectors/packet-x509if.c
+++ b/epan/dissectors/packet-x509if.c
@@ -52,9 +52,12 @@
/* Initialize the protocol and registered fields */
int proto_x509if = -1;
static int hf_x509if_object_identifier_id = -1;
+static int hf_x509if_any_string = -1;
/*--- Included file: packet-x509if-hf.c ---*/
+static int hf_x509if_Name_PDU = -1; /* Name */
+static int hf_x509if_DistinguishedName_PDU = -1; /* DistinguishedName */
static int hf_x509if_type = -1; /* AttributeId */
static int hf_x509if_values = -1; /* SET_OF_AttributeValue */
static int hf_x509if_values_item = -1; /* AttributeValue */
@@ -78,8 +81,8 @@ static int hf_x509if_ca_contextValues_item = -1; /* ContextValue */
static int hf_x509if_ata_assertedContexts = -1; /* SEQUENCE_OF_ContextAssertion */
static int hf_x509if_assertedContexts_item = -1; /* ContextAssertion */
static int hf_x509if_rdnSequence = -1; /* RDNSequence */
-static int hf_x509if_RDNSequence_item = -1; /* RelativeDistinguishedName */
-static int hf_x509if_RelativeDistinguishedName_item = -1; /* AttributeTypeAndDistinguishedValue */
+static int hf_x509if_RDNSequence_item = -1; /* RDNSequence_item */
+static int hf_x509if_RelativeDistinguishedName_item = -1; /* RelativeDistinguishedName_item */
static int hf_x509if_atadv_value = -1; /* AttributeValue */
static int hf_x509if_primaryDistinguished = -1; /* BOOLEAN */
static int hf_x509if_valueswithContext = -1; /* T_valWithContext */
@@ -277,6 +280,18 @@ static gint ett_x509if_MRSubstitution = -1;
static const char *object_identifier_id;
+static proto_tree *top_of_dn = NULL;
+static proto_tree *top_of_rdn = NULL;
+
+static gboolean rdn_one_value = FALSE; /* have we seen one value in an RDN yet */
+static gboolean dn_one_rdn = FALSE; /* have we seen one RDN in a DN yet */
+static gboolean doing_dn = TRUE;
+
+#define MAX_RDN_STR_LEN 64
+#define MAX_DN_STR_LEN (20 * MAX_RDN_STR_LEN)
+
+static char *last_dn = NULL;
+static char *last_rdn = NULL;
/*--- Included file: packet-x509if-fn.c ---*/
@@ -348,7 +363,25 @@ static int dissect_description(packet_info *pinfo, proto_tree *tree, tvbuff_t *t
static int
dissect_x509if_AttributeId(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_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id);
+ char *name;
+
+ offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id);
+
+
+ if(object_identifier_id) {
+ /* see if we can find a nice name */
+ name = get_ber_oid_name(object_identifier_id);
+ if(!name) name = object_identifier_id;
+
+ if(doing_dn) { /* append it to the RDN */
+ g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
+ g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
+
+ /* append it to the tree */
+ proto_item_append_text(tree, " (%s=", name);
+ }
+ }
+
return offset;
}
@@ -376,10 +409,30 @@ static int dissect_restrictionType(packet_info *pinfo, proto_tree *tree, tvbuff_
-static int
+int
dissect_x509if_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ int old_offset = offset;
+ tvbuff_t *out_tvb;
+ char *value = NULL;
+
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ /* try and dissect as a string */
+ dissect_ber_octet_string(FALSE, pinfo, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb);
+
+ if(out_tvb) {
+ /* it was a string - format it */
+ value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb));
+
+ if(doing_dn) {
+ g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
+
+ /* append it to the tree*/
+ proto_item_append_text(tree, "%s)", value);
+ }
+
+ }
+
return offset;
}
@@ -776,8 +829,31 @@ dissect_x509if_AttributeTypeAndDistinguishedValue(gboolean implicit_tag _U_, tvb
return offset;
}
+
+
+
+static int
+dissect_x509if_RelativeDistinguishedName_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+
+ if(!rdn_one_value) {
+ top_of_rdn = tree;
+ } else {
+
+ if(doing_dn)
+ /* this is an additional value - delimit */
+ g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
+ }
+
+ offset = dissect_x509if_AttributeTypeAndDistinguishedValue(implicit_tag, tvb, offset, pinfo, tree, hf_index);
+
+
+ rdn_one_value = TRUE;
+
+
+ return offset;
+}
static int dissect_RelativeDistinguishedName_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509if_AttributeTypeAndDistinguishedValue(FALSE, tvb, offset, pinfo, tree, hf_x509if_RelativeDistinguishedName_item);
+ return dissect_x509if_RelativeDistinguishedName_item(FALSE, tvb, offset, pinfo, tree, hf_x509if_RelativeDistinguishedName_item);
}
@@ -787,13 +863,56 @@ static const ber_sequence_t RelativeDistinguishedName_set_of[1] = {
int
dissect_x509if_RelativeDistinguishedName(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,
+ char *temp_dn;
+
+ rdn_one_value = FALSE;
+ top_of_rdn = tree;
+ last_rdn = ep_alloc(MAX_DN_STR_LEN); *last_rdn = '\0';
+ doing_dn = TRUE;
+
+ offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
RelativeDistinguishedName_set_of, hf_index, ett_x509if_RelativeDistinguishedName);
+
+ /* we've finished - close the bracket */
+ proto_item_append_text(top_of_rdn, " (%s)", last_rdn);
+
+ /* now append this to the DN */
+ if(*last_dn) {
+ temp_dn = ep_alloc(MAX_DN_STR_LEN); /* is there a better way to use ep_alloc here ? */
+ g_snprintf(temp_dn, MAX_DN_STR_LEN, "%s,%s", last_rdn, last_dn);
+ last_dn[0] = '\0';
+ g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN);
+ } else
+ g_strlcat(last_dn, last_rdn, MAX_DN_STR_LEN);
+
+ doing_dn = FALSE;
+ last_rdn = NULL; /* it will get freed when the next packet is dissected */
+
+
+ return offset;
+}
+
+
+
+static int
+dissect_x509if_RDNSequence_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+
+ if(!dn_one_rdn) {
+ /* this is the first element - record the top */
+ top_of_dn = tree;
+ }
+
+ offset = dissect_x509if_RelativeDistinguishedName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
+
+
+ dn_one_rdn = TRUE;
+
+
return offset;
}
static int dissect_RDNSequence_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509if_RelativeDistinguishedName(FALSE, tvb, offset, pinfo, tree, hf_x509if_RDNSequence_item);
+ return dissect_x509if_RDNSequence_item(FALSE, tvb, offset, pinfo, tree, hf_x509if_RDNSequence_item);
}
@@ -803,9 +922,20 @@ static const ber_sequence_t RDNSequence_sequence_of[1] = {
int
dissect_x509if_RDNSequence(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,
+
+ dn_one_rdn = FALSE; /* reset */
+ last_dn = ep_alloc(MAX_RDN_STR_LEN); *last_dn = '\0';
+ top_of_dn = NULL;
+
+ offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
RDNSequence_sequence_of, hf_index, ett_x509if_RDNSequence);
+
+ /* we've finished - append the dn */
+ proto_item_append_text(top_of_dn, " (%s)", last_dn);
+
+
+
return offset;
}
static int dissect_rdnSequence(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
@@ -2020,10 +2150,23 @@ dissect_x509if_OutputValues(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset
return offset;
}
+/*--- PDUs ---*/
+
+static void dissect_Name_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509if_Name(FALSE, tvb, 0, pinfo, tree, hf_x509if_Name_PDU);
+}
+static void dissect_DistinguishedName_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509if_DistinguishedName(FALSE, tvb, 0, pinfo, tree, hf_x509if_DistinguishedName_PDU);
+}
+
/*--- End of included file: packet-x509if-fn.c ---*/
+const char * x509if_get_last_dn()
+{
+ return last_dn;
+}
/*--- proto_register_x509if ----------------------------------------------*/
void proto_register_x509if(void) {
@@ -2033,10 +2176,21 @@ void proto_register_x509if(void) {
{ &hf_x509if_object_identifier_id,
{ "Id", "x509if.id", FT_STRING, BASE_NONE, NULL, 0,
"Object identifier Id", HFILL }},
+ { &hf_x509if_any_string,
+ { "AnyString", "x509if.any.String", FT_BYTES, BASE_HEX,
+ NULL, 0, "This is any String", HFILL }},
/*--- Included file: packet-x509if-hfarr.c ---*/
+ { &hf_x509if_Name_PDU,
+ { "Name", "x509if.Name",
+ FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
+ "Name", HFILL }},
+ { &hf_x509if_DistinguishedName_PDU,
+ { "DistinguishedName", "x509if.DistinguishedName",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "DistinguishedName", HFILL }},
{ &hf_x509if_type,
{ "type", "x509if.type",
FT_STRING, BASE_NONE, NULL, 0,
@@ -2689,5 +2843,6 @@ void proto_register_x509if(void) {
/*--- proto_reg_handoff_x509if -------------------------------------------*/
void proto_reg_handoff_x509if(void) {
+
}
diff --git a/epan/dissectors/packet-x509if.h b/epan/dissectors/packet-x509if.h
index 044fa42425..d5b0920f96 100644
--- a/epan/dissectors/packet-x509if.h
+++ b/epan/dissectors/packet-x509if.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x509if.h */
+/* .\packet-x509if.h */
/* ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */
/* Input file: packet-x509if-template.h */
@@ -43,6 +43,7 @@ extern const value_string x509if_ImposedSubset_vals[];
extern const value_string x509if_ContextCombination_vals[];
extern const value_string x509if_AttributeCombination_vals[];
extern const value_string x509if_OutputValues_vals[];
+int dissect_x509if_AttributeValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x509if_Attribute(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x509if_AttributeType(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
int dissect_x509if_Context(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
@@ -86,5 +87,7 @@ int dissect_x509if_MRSubstitution(gboolean implicit_tag, tvbuff_t *tvb, int offs
/*--- End of included file: packet-x509if-exp.h ---*/
+extern const char * x509if_get_last_dn();
+
#endif /* PACKET_X509IF_H */
diff --git a/epan/dissectors/packet-x509sat.c b/epan/dissectors/packet-x509sat.c
index 52bbf2cd96..133792b761 100644
--- a/epan/dissectors/packet-x509sat.c
+++ b/epan/dissectors/packet-x509sat.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x509sat.c */
+/* .\packet-x509sat.c */
/* ../../tools/asn2eth.py -X -b -e -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
/* Input file: packet-x509sat-template.c */
@@ -55,9 +55,26 @@ int proto_x509sat = -1;
/*--- Included file: packet-x509sat-hf.c ---*/
static int hf_x509sat_DirectoryString_PDU = -1; /* DirectoryString */
+static int hf_x509sat_UniqueIdentifier_PDU = -1; /* UniqueIdentifier */
static int hf_x509sat_CountryName_PDU = -1; /* CountryName */
+static int hf_x509sat_Guide_PDU = -1; /* Guide */
+static int hf_x509sat_Criteria_PDU = -1; /* Criteria */
+static int hf_x509sat_EnhancedGuide_PDU = -1; /* EnhancedGuide */
+static int hf_x509sat_PostalAddress_PDU = -1; /* PostalAddress */
static int hf_x509sat_TelephoneNumber_PDU = -1; /* TelephoneNumber */
static int hf_x509sat_TelexNumber_PDU = -1; /* TelexNumber */
+static int hf_x509sat_FacsimileTelephoneNumber_PDU = -1; /* FacsimileTelephoneNumber */
+static int hf_x509sat_X121Address_PDU = -1; /* X121Address */
+static int hf_x509sat_InternationalISDNNumber_PDU = -1; /* InternationalISDNNumber */
+static int hf_x509sat_DestinationIndicator_PDU = -1; /* DestinationIndicator */
+static int hf_x509sat_PreferredDeliveryMethod_PDU = -1; /* PreferredDeliveryMethod */
+static int hf_x509sat_PresentationAddress_PDU = -1; /* PresentationAddress */
+static int hf_x509sat_NameAndOptionalUID_PDU = -1; /* NameAndOptionalUID */
+static int hf_x509sat_CaseIgnoreListMatch_PDU = -1; /* CaseIgnoreListMatch */
+static int hf_x509sat_DayTimeBand_PDU = -1; /* DayTimeBand */
+static int hf_x509sat_DayTime_PDU = -1; /* DayTime */
+static int hf_x509sat_objectClass = -1; /* OBJECT_IDENTIFIER */
+static int hf_x509sat_criteria = -1; /* Criteria */
static int hf_x509sat_type = -1; /* CriteriaItem */
static int hf_x509sat_and = -1; /* SET_OF_Criteria */
static int hf_x509sat_and_item = -1; /* Criteria */
@@ -69,8 +86,6 @@ static int hf_x509sat_substrings = -1; /* AttributeType */
static int hf_x509sat_greaterOrEqual = -1; /* AttributeType */
static int hf_x509sat_lessOrEqual = -1; /* AttributeType */
static int hf_x509sat_approximateMatch = -1; /* AttributeType */
-static int hf_x509sat_objectClass = -1; /* OBJECT_IDENTIFIER */
-static int hf_x509sat_criteria = -1; /* Criteria */
static int hf_x509sat_subset = -1; /* T_subset */
static int hf_x509sat_PostalAddress_item = -1; /* DirectoryString */
static int hf_x509sat_telexNumber = -1; /* PrintableString */
@@ -187,6 +202,7 @@ static int hf_x509sat_T_bitNamedDays_saturday = -1;
/*--- Included file: packet-x509sat-ett.c ---*/
+static gint ett_x509sat_Guide = -1;
static gint ett_x509sat_Criteria = -1;
static gint ett_x509sat_SET_OF_Criteria = -1;
static gint ett_x509sat_CriteriaItem = -1;
@@ -245,6 +261,9 @@ static gint ett_x509sat_LocaleContextSyntax = -1;
/* Criteria -> Criteria */
int dissect_x509sat_Criteria(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
+static int dissect_criteria(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509sat_Criteria(FALSE, tvb, offset, pinfo, tree, hf_x509sat_criteria);
+}
static int dissect_and_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509sat_Criteria(FALSE, tvb, offset, pinfo, tree, hf_x509sat_and_item);
}
@@ -254,9 +273,6 @@ static int dissect_or_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
static int dissect_not(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_x509sat_Criteria(FALSE, tvb, offset, pinfo, tree, hf_x509sat_not);
}
-static int dissect_criteria(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509sat_Criteria(FALSE, tvb, offset, pinfo, tree, hf_x509sat_criteria);
-}
/*--- Fields for imported types ---*/
@@ -343,6 +359,27 @@ dissect_x509sat_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset
}
+
+static int
+dissect_x509sat_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_objectClass(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_objectClass);
+}
+static int dissect_profiles_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_profiles_item);
+}
+static int dissect_matchingRuleUsed(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_matchingRuleUsed);
+}
+static int dissect_localeID1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+ return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_localeID1);
+}
+
+
static const value_string x509sat_CriteriaItem_vals[] = {
{ 0, "equality" },
{ 1, "substrings" },
@@ -419,26 +456,19 @@ dissect_x509sat_Criteria(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, p
}
+static const ber_sequence_t Guide_set[] = {
+ { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_objectClass },
+ { BER_CLASS_CON, 1, BER_FLAGS_NOTCHKTAG, dissect_criteria },
+ { 0, 0, 0, NULL }
+};
static int
-dissect_x509sat_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_x509sat_Guide(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,
+ Guide_set, hf_index, ett_x509sat_Guide);
return offset;
}
-static int dissect_objectClass(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_objectClass);
-}
-static int dissect_profiles_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_profiles_item);
-}
-static int dissect_matchingRuleUsed(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_matchingRuleUsed);
-}
-static int dissect_localeID1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_x509sat_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_x509sat_localeID1);
-}
static const value_string x509sat_T_subset_vals[] = {
@@ -1559,15 +1589,60 @@ dissect_x509sat_LocaleContextSyntax(gboolean implicit_tag _U_, tvbuff_t *tvb, in
static void dissect_DirectoryString_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_x509sat_DirectoryString(FALSE, tvb, 0, pinfo, tree, hf_x509sat_DirectoryString_PDU);
}
+static void dissect_UniqueIdentifier_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_UniqueIdentifier(FALSE, tvb, 0, pinfo, tree, hf_x509sat_UniqueIdentifier_PDU);
+}
static void dissect_CountryName_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_x509sat_CountryName(FALSE, tvb, 0, pinfo, tree, hf_x509sat_CountryName_PDU);
}
+static void dissect_Guide_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_Guide(FALSE, tvb, 0, pinfo, tree, hf_x509sat_Guide_PDU);
+}
+static void dissect_Criteria_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_Criteria(FALSE, tvb, 0, pinfo, tree, hf_x509sat_Criteria_PDU);
+}
+static void dissect_EnhancedGuide_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_EnhancedGuide(FALSE, tvb, 0, pinfo, tree, hf_x509sat_EnhancedGuide_PDU);
+}
+static void dissect_PostalAddress_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_PostalAddress(FALSE, tvb, 0, pinfo, tree, hf_x509sat_PostalAddress_PDU);
+}
static void dissect_TelephoneNumber_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_x509sat_TelephoneNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_TelephoneNumber_PDU);
}
static void dissect_TelexNumber_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_x509sat_TelexNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_TelexNumber_PDU);
}
+static void dissect_FacsimileTelephoneNumber_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_FacsimileTelephoneNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_FacsimileTelephoneNumber_PDU);
+}
+static void dissect_X121Address_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_X121Address(FALSE, tvb, 0, pinfo, tree, hf_x509sat_X121Address_PDU);
+}
+static void dissect_InternationalISDNNumber_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_InternationalISDNNumber(FALSE, tvb, 0, pinfo, tree, hf_x509sat_InternationalISDNNumber_PDU);
+}
+static void dissect_DestinationIndicator_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_DestinationIndicator(FALSE, tvb, 0, pinfo, tree, hf_x509sat_DestinationIndicator_PDU);
+}
+static void dissect_PreferredDeliveryMethod_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_PreferredDeliveryMethod(FALSE, tvb, 0, pinfo, tree, hf_x509sat_PreferredDeliveryMethod_PDU);
+}
+static void dissect_PresentationAddress_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_PresentationAddress(FALSE, tvb, 0, pinfo, tree, hf_x509sat_PresentationAddress_PDU);
+}
+static void dissect_NameAndOptionalUID_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_NameAndOptionalUID(FALSE, tvb, 0, pinfo, tree, hf_x509sat_NameAndOptionalUID_PDU);
+}
+static void dissect_CaseIgnoreListMatch_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_CaseIgnoreListMatch(FALSE, tvb, 0, pinfo, tree, hf_x509sat_CaseIgnoreListMatch_PDU);
+}
+static void dissect_DayTimeBand_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_DayTimeBand(FALSE, tvb, 0, pinfo, tree, hf_x509sat_DayTimeBand_PDU);
+}
+static void dissect_DayTime_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+ dissect_x509sat_DayTime(FALSE, tvb, 0, pinfo, tree, hf_x509sat_DayTime_PDU);
+}
/*--- End of included file: packet-x509sat-fn.c ---*/
@@ -1586,10 +1661,30 @@ void proto_register_x509sat(void) {
{ "DirectoryString", "x509sat.DirectoryString",
FT_STRING, BASE_NONE, NULL, 0,
"DirectoryString", HFILL }},
+ { &hf_x509sat_UniqueIdentifier_PDU,
+ { "UniqueIdentifier", "x509sat.UniqueIdentifier",
+ FT_BYTES, BASE_HEX, NULL, 0,
+ "UniqueIdentifier", HFILL }},
{ &hf_x509sat_CountryName_PDU,
{ "CountryName", "x509sat.CountryName",
FT_STRING, BASE_NONE, NULL, 0,
"CountryName", HFILL }},
+ { &hf_x509sat_Guide_PDU,
+ { "Guide", "x509sat.Guide",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "Guide", HFILL }},
+ { &hf_x509sat_Criteria_PDU,
+ { "Criteria", "x509sat.Criteria",
+ FT_UINT32, BASE_DEC, VALS(x509sat_Criteria_vals), 0,
+ "Criteria", HFILL }},
+ { &hf_x509sat_EnhancedGuide_PDU,
+ { "EnhancedGuide", "x509sat.EnhancedGuide",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "EnhancedGuide", HFILL }},
+ { &hf_x509sat_PostalAddress_PDU,
+ { "PostalAddress", "x509sat.PostalAddress",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "PostalAddress", HFILL }},
{ &hf_x509sat_TelephoneNumber_PDU,
{ "TelephoneNumber", "x509sat.TelephoneNumber",
FT_STRING, BASE_NONE, NULL, 0,
@@ -1598,6 +1693,54 @@ void proto_register_x509sat(void) {
{ "TelexNumber", "x509sat.TelexNumber",
FT_NONE, BASE_NONE, NULL, 0,
"TelexNumber", HFILL }},
+ { &hf_x509sat_FacsimileTelephoneNumber_PDU,
+ { "FacsimileTelephoneNumber", "x509sat.FacsimileTelephoneNumber",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "FacsimileTelephoneNumber", HFILL }},
+ { &hf_x509sat_X121Address_PDU,
+ { "X121Address", "x509sat.X121Address",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "X121Address", HFILL }},
+ { &hf_x509sat_InternationalISDNNumber_PDU,
+ { "InternationalISDNNumber", "x509sat.InternationalISDNNumber",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "InternationalISDNNumber", HFILL }},
+ { &hf_x509sat_DestinationIndicator_PDU,
+ { "DestinationIndicator", "x509sat.DestinationIndicator",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "DestinationIndicator", HFILL }},
+ { &hf_x509sat_PreferredDeliveryMethod_PDU,
+ { "PreferredDeliveryMethod", "x509sat.PreferredDeliveryMethod",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "PreferredDeliveryMethod", HFILL }},
+ { &hf_x509sat_PresentationAddress_PDU,
+ { "PresentationAddress", "x509sat.PresentationAddress",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "PresentationAddress", HFILL }},
+ { &hf_x509sat_NameAndOptionalUID_PDU,
+ { "NameAndOptionalUID", "x509sat.NameAndOptionalUID",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "NameAndOptionalUID", HFILL }},
+ { &hf_x509sat_CaseIgnoreListMatch_PDU,
+ { "CaseIgnoreListMatch", "x509sat.CaseIgnoreListMatch",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "CaseIgnoreListMatch", HFILL }},
+ { &hf_x509sat_DayTimeBand_PDU,
+ { "DayTimeBand", "x509sat.DayTimeBand",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "DayTimeBand", HFILL }},
+ { &hf_x509sat_DayTime_PDU,
+ { "DayTime", "x509sat.DayTime",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "DayTime", HFILL }},
+ { &hf_x509sat_objectClass,
+ { "objectClass", "x509sat.objectClass",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "", HFILL }},
+ { &hf_x509sat_criteria,
+ { "criteria", "x509sat.criteria",
+ FT_UINT32, BASE_DEC, VALS(x509sat_Criteria_vals), 0,
+ "", HFILL }},
{ &hf_x509sat_type,
{ "type", "x509sat.type",
FT_UINT32, BASE_DEC, VALS(x509sat_CriteriaItem_vals), 0,
@@ -1642,14 +1785,6 @@ void proto_register_x509sat(void) {
{ "approximateMatch", "x509sat.approximateMatch",
FT_STRING, BASE_NONE, NULL, 0,
"CriteriaItem/approximateMatch", HFILL }},
- { &hf_x509sat_objectClass,
- { "objectClass", "x509sat.objectClass",
- FT_STRING, BASE_NONE, NULL, 0,
- "EnhancedGuide/objectClass", HFILL }},
- { &hf_x509sat_criteria,
- { "criteria", "x509sat.criteria",
- FT_UINT32, BASE_DEC, VALS(x509sat_Criteria_vals), 0,
- "EnhancedGuide/criteria", HFILL }},
{ &hf_x509sat_subset,
{ "subset", "x509sat.subset",
FT_INT32, BASE_DEC, VALS(x509sat_T_subset_vals), 0,
@@ -2088,6 +2223,7 @@ void proto_register_x509sat(void) {
/*--- Included file: packet-x509sat-ettarr.c ---*/
+ &ett_x509sat_Guide,
&ett_x509sat_Criteria,
&ett_x509sat_SET_OF_Criteria,
&ett_x509sat_CriteriaItem,
diff --git a/epan/dissectors/packet-x509sat.h b/epan/dissectors/packet-x509sat.h
index e2fc9b5d5a..461ae474c2 100644
--- a/epan/dissectors/packet-x509sat.h
+++ b/epan/dissectors/packet-x509sat.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* ./packet-x509sat.h */
+/* .\packet-x509sat.h */
/* ../../tools/asn2eth.py -X -b -e -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn */
/* Input file: packet-x509sat-template.h */