diff options
author | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-06-05 12:00:57 +0000 |
---|---|---|
committer | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-06-05 12:00:57 +0000 |
commit | 15ff64f6cbc560f06cfe6a38c7f569edaa02bd04 (patch) | |
tree | a1f6be33237edf23b9b6bdb87a1014d78b96736f /epan/dissectors/packet-x509ce.c | |
parent | ef8862cd71d0e28272a2156a96f5e7c1f51e7917 (diff) |
not allow #.FN_HDR/FTR for Wireshark types but only for ASN.1 types
it makes interconnection between .cnf file and ASN.1 source more readable
(changes for #.FN_BODY will follow)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22043 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-x509ce.c')
-rw-r--r-- | epan/dissectors/packet-x509ce.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/epan/dissectors/packet-x509ce.c b/epan/dissectors/packet-x509ce.c index b617815157..0ff1c526cc 100644 --- a/epan/dissectors/packet-x509ce.c +++ b/epan/dissectors/packet-x509ce.c @@ -110,7 +110,7 @@ static int hf_x509ce_dNSName = -1; /* IA5String */ static int hf_x509ce_x400Address = -1; /* ORAddress */ static int hf_x509ce_directoryName = -1; /* Name */ static int hf_x509ce_ediPartyName = -1; /* EDIPartyName */ -static int hf_x509ce_uniformResourceIdentifier = -1; /* IA5String */ +static int hf_x509ce_uniformResourceIdentifier = -1; /* T_uniformResourceIdentifier */ static int hf_x509ce_iPAddress = -1; /* T_iPAddress */ static int hf_x509ce_registeredID = -1; /* OBJECT_IDENTIFIER */ static int hf_x509ce_type_id = -1; /* OtherNameType */ @@ -392,11 +392,6 @@ dissect_x509ce_IA5String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse actx, tree, tvb, offset, hf_index, NULL); -#line 127 "x509ce.cnf" - if(hf_index == hf_x509ce_uniformResourceIdentifier) - PROTO_ITEM_SET_URL(get_ber_last_created_item()); - - return offset; } static int dissect_rfc822Name_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { @@ -405,9 +400,6 @@ static int dissect_rfc822Name_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int static int dissect_dNSName_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_x509ce_IA5String(TRUE, tvb, offset, actx, tree, hf_x509ce_dNSName); } -static int dissect_uniformResourceIdentifier_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x509ce_IA5String(TRUE, tvb, offset, actx, tree, hf_x509ce_uniformResourceIdentifier); -} static const ber_old_sequence_t EDIPartyName_sequence[] = { @@ -430,6 +422,25 @@ static int dissect_ediPartyName_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, in static int +dissect_x509ce_T_uniformResourceIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String, + actx, tree, tvb, offset, hf_index, + NULL); + +#line 127 "x509ce.cnf" + + PROTO_ITEM_SET_URL(get_ber_last_created_item()); + + + return offset; +} +static int dissect_uniformResourceIdentifier_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { + return dissect_x509ce_T_uniformResourceIdentifier(TRUE, tvb, offset, actx, tree, hf_x509ce_uniformResourceIdentifier); +} + + + +static int dissect_x509ce_T_iPAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 117 "x509ce.cnf" proto_tree_add_item(tree, hf_x509ce_IPAddress, tvb, offset, 4, FALSE); @@ -1980,7 +1991,7 @@ void proto_register_x509ce(void) { { &hf_x509ce_uniformResourceIdentifier, { "uniformResourceIdentifier", "x509ce.uniformResourceIdentifier", FT_STRING, BASE_NONE, NULL, 0, - "x509ce.IA5String", HFILL }}, + "x509ce.T_uniformResourceIdentifier", HFILL }}, { &hf_x509ce_iPAddress, { "iPAddress", "x509ce.iPAddress", FT_BYTES, BASE_HEX, NULL, 0, |