From c1ddd6046d8968e8df1aaea2e4cda78fcde87d21 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Fri, 28 Jun 2013 12:52:13 +0000 Subject: [PATCH] replace object_identifier_id with actx->external.direct_reference svn path=/trunk/; revision=50209 --- asn1/p22/p22.cnf | 10 ++-- asn1/p22/packet-p22-template.c | 2 - asn1/x509ce/packet-x509ce-template.c | 3 -- asn1/x509ce/x509ce.cnf | 8 ++-- asn1/x509if/packet-x509if-template.c | 2 - asn1/x509if/x509if.cnf | 60 ++++++++++++------------ epan/dissectors/packet-p22.c | 26 +++++------ epan/dissectors/packet-x509ce.c | 19 ++++---- epan/dissectors/packet-x509if.c | 70 ++++++++++++++-------------- 9 files changed, 93 insertions(+), 107 deletions(-) diff --git a/asn1/p22/p22.cnf b/asn1/p22/p22.cnf index 478ad178c3..8e2c40de9f 100644 --- a/asn1/p22/p22.cnf +++ b/asn1/p22/p22.cnf @@ -215,19 +215,19 @@ RecipientSecurityRequest B "2.6.1.18.0" "id-sec-ipm-security-request" IpnSecurityResponse B "2.6.1.18.1" "id-sec-security-common-fields" #.FN_PARS IPMSExtension/type - FN_VARIANT = _str VAL_PTR = &object_identifier_id + FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference #.FN_BODY IPMSExtension/type const char *name = NULL; %(DEFAULT_BODY)s - name = oid_resolved_from_string(object_identifier_id); - proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); + name = oid_resolved_from_string(actx->external.direct_reference); + proto_item_append_text(tree, " (%%s)", name ? name : actx->external.direct_reference); #.FN_BODY IPMSExtension/value - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_BODY IPM @@ -273,7 +273,7 @@ IpnSecurityResponse B "2.6.1.18.1" "id-sec-security-common-fields" /* XXX: Not implemented yet */ #.FN_BODY CompressionParameter/compression-algorithm-id - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); #.FN_BODY CompressionParameter/compression-algorithm-param /* XXX: Not implemented yet */ diff --git a/asn1/p22/packet-p22-template.c b/asn1/p22/packet-p22-template.c index 6c9a1ee97e..1c3f7c4959 100644 --- a/asn1/p22/packet-p22-template.c +++ b/asn1/p22/packet-p22-template.c @@ -49,8 +49,6 @@ /* Initialize the protocol and registered fields */ static int proto_p22 = -1; -static const char *object_identifier_id; /* content type identifier */ - static const value_string charsetreg_vals [] = { { 1, "C0: (ISO/IEC 6429)"}, { 6, "G0: ASCII (ISO/IEC 646)"}, diff --git a/asn1/x509ce/packet-x509ce-template.c b/asn1/x509ce/packet-x509ce-template.c index a45427fef8..1d0f85570d 100644 --- a/asn1/x509ce/packet-x509ce-template.c +++ b/asn1/x509ce/packet-x509ce-template.c @@ -50,9 +50,6 @@ static int hf_x509ce_IPAddress = -1; /* Initialize the subtree pointers */ #include "packet-x509ce-ett.c" - -static const char *object_identifier_id; - #include "packet-x509ce-fn.c" /* CI+ (www.ci-plus.com) defines some X.509 certificate extensions diff --git a/asn1/x509ce/x509ce.cnf b/asn1/x509ce/x509ce.cnf index 31ee0ae38e..d66748a0b1 100644 --- a/asn1/x509ce/x509ce.cnf +++ b/asn1/x509ce/x509ce.cnf @@ -165,20 +165,20 @@ CertificateAssertion/subjectAltName subjectAltNameType EnhancedCertificateAssertion/pathToName enhancedPathToName #.FN_PARS PolicyQualifierInfo/policyQualifierId - FN_VARIANT = _str HF_INDEX = hf_x509ce_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509ce_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY PolicyQualifierInfo/qualifier - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_BODY GeneralName/iPAddress proto_tree_add_item(tree, hf_x509ce_IPAddress, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; #.FN_PARS OtherNameType - FN_VARIANT = _str VAL_PTR = &object_identifier_id + FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference #.FN_BODY OtherNameValue - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_FTR GeneralName/uniformResourceIdentifier diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index 47563d90f8..cf91aab84c 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -51,7 +51,6 @@ static int hf_x509if_any_string = -1; /* Initialize the subtree pointers */ #include "packet-x509if-ett.c" -static const char *object_identifier_id = NULL; static proto_tree *top_of_dn = NULL; static proto_tree *top_of_rdn = NULL; @@ -74,7 +73,6 @@ static char *last_ava = NULL; static void x509if_frame_end(void) { - object_identifier_id = NULL; top_of_dn = NULL; top_of_rdn = NULL; diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index b730e2a2e5..cbf815273f 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -180,13 +180,13 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" #.FN_PARS ContextAssertion/contextType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY ContextAssertion/contextValues/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS AttributeTypeAndDistinguishedValue/type - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY AttributeTypeAndDistinguishedValue/type const char *fmt; @@ -194,10 +194,10 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" %(DEFAULT_BODY)s - if(object_identifier_id) { + if(actx->external.direct_reference) { /* see if we can find a nice name */ - name = oid_resolved_from_string(object_identifier_id); - if(!name) name = object_identifier_id; + name = oid_resolved_from_string(actx->external.direct_reference); + if(!name) name = actx->external.direct_reference; if(last_rdn) { /* append it to the RDN */ g_strlcat(last_rdn, name, MAX_RDN_STR_LEN); @@ -228,13 +228,13 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" char *value = NULL; const char *fmt; const char *name = NULL; - const char *orig_oid = object_identifier_id; + const char *orig_oid = actx->external.direct_reference; - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); /* in dissecting the value we may have overridden the OID of the value - which is a problem if there are multiple values */ - object_identifier_id = orig_oid; + actx->external.direct_reference = orig_oid; /* try and dissect as a string */ dissect_ber_octet_string(FALSE, actx, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb); @@ -260,8 +260,8 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); } - if(!(name = oid_resolved_from_string(object_identifier_id))) - name = object_identifier_id; + if(!(name = oid_resolved_from_string(actx->external.direct_reference))) + name = actx->external.direct_reference; g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s %%s", name, fmt, value); proto_item_append_text(tree, " %%s", last_ava); @@ -270,64 +270,64 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" } #.FN_PARS RequestAttribute/attributeType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY RequestAttribute/selectedValues/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS RequestAttribute/defaultValues/_item/entryType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY RequestAttribute/defaultValues/_item/values/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_BODY Attribute/valuesWithContext/_item/value offset=call_ber_oid_callback("unknown", tvb, offset, actx->pinfo, tree); #.FN_PARS ResultAttribute/attributeType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY ResultAttribute/outputValues/selectedValues/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS Context/contextType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY Context/contextValues/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS AttributeType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY AttributeValue - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS AttributeValueAssertion/type - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY AttributeValueAssertion/assertion - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS Attribute/type - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY Attribute/values/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS ContextProfile/contextType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY ContextProfile/contextValue/_item - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_PARS MatchingUse/restrictionType - FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id + FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference #.FN_BODY MatchingUse/restrictionValue - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_BODY AttributeTypeAndDistinguishedValue/valuesWithContext/_item/distingAttrValue - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); #.FN_BODY RelativeDistinguishedName char *temp_dn; diff --git a/epan/dissectors/packet-p22.c b/epan/dissectors/packet-p22.c index 5d95bca7e0..20a9b5c485 100644 --- a/epan/dissectors/packet-p22.c +++ b/epan/dissectors/packet-p22.c @@ -57,8 +57,6 @@ /* Initialize the protocol and registered fields */ static int proto_p22 = -1; -static const char *object_identifier_id; /* content type identifier */ - static const value_string charsetreg_vals [] = { { 1, "C0: (ISO/IEC 6429)"}, { 6, "G0: ASCII (ISO/IEC 646)"}, @@ -340,7 +338,7 @@ static const value_string charsetreg_vals [] = { #define ub_telephone_number 32 /*--- End of included file: packet-p22-val.h ---*/ -#line 84 "../../asn1/p22/packet-p22-template.c" +#line 82 "../../asn1/p22/packet-p22-template.c" /*--- Included file: packet-p22-hf.c ---*/ @@ -725,7 +723,7 @@ static int hf_p22_RecipientSecurityRequest_ipn_non_repudiation = -1; static int hf_p22_RecipientSecurityRequest_ipn_proof = -1; /*--- End of included file: packet-p22-hf.c ---*/ -#line 86 "../../asn1/p22/packet-p22-template.c" +#line 84 "../../asn1/p22/packet-p22-template.c" /* Initialize the subtree pointers */ static gint ett_p22 = -1; @@ -859,7 +857,7 @@ static gint ett_p22_T_body_part_token_choice = -1; static gint ett_p22_T_choice = -1; /*--- End of included file: packet-p22-ett.c ---*/ -#line 90 "../../asn1/p22/packet-p22-template.c" +#line 88 "../../asn1/p22/packet-p22-template.c" /*--- Included file: packet-p22-fn.c ---*/ @@ -1037,11 +1035,11 @@ dissect_p22_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, #line 221 "../../asn1/p22/p22.cnf" const char *name = NULL; - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - name = oid_resolved_from_string(object_identifier_id); - proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); + name = oid_resolved_from_string(actx->external.direct_reference); + proto_item_append_text(tree, " (%s)", name ? name : actx->external.direct_reference); @@ -1054,7 +1052,7 @@ static int dissect_p22_T_value(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 229 "../../asn1/p22/p22.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -3104,7 +3102,7 @@ dissect_p22_EnvironmentParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i static int dissect_p22_T_compression_algorithm_id(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 276 "../../asn1/p22/p22.cnf" - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); @@ -4509,7 +4507,7 @@ static void dissect_ForwardedContentToken_PDU(tvbuff_t *tvb _U_, packet_info *pi /*--- End of included file: packet-p22-fn.c ---*/ -#line 92 "../../asn1/p22/packet-p22-template.c" +#line 90 "../../asn1/p22/packet-p22-template.c" /* * Dissect P22 PDUs inside a PPDU. @@ -6054,7 +6052,7 @@ void proto_register_p22(void) { NULL, HFILL }}, /*--- End of included file: packet-p22-hfarr.c ---*/ -#line 124 "../../asn1/p22/packet-p22-template.c" +#line 122 "../../asn1/p22/packet-p22-template.c" }; /* List of subtrees */ @@ -6190,7 +6188,7 @@ void proto_register_p22(void) { &ett_p22_T_choice, /*--- End of included file: packet-p22-ettarr.c ---*/ -#line 130 "../../asn1/p22/packet-p22-template.c" +#line 128 "../../asn1/p22/packet-p22-template.c" }; /* Register protocol */ @@ -6310,7 +6308,7 @@ void proto_reg_handoff_p22(void) { /*--- End of included file: packet-p22-dis-tab.c ---*/ -#line 146 "../../asn1/p22/packet-p22-template.c" +#line 144 "../../asn1/p22/packet-p22-template.c" register_ber_oid_dissector("2.6.1.10.0", dissect_p22, proto_p22, "InterPersonal Message (1984)"); register_ber_oid_dissector("2.6.1.10.1", dissect_p22, proto_p22, "InterPersonal Message (1988)"); diff --git a/epan/dissectors/packet-x509ce.c b/epan/dissectors/packet-x509ce.c index 20dc16eb50..108c07bbbd 100644 --- a/epan/dissectors/packet-x509ce.c +++ b/epan/dissectors/packet-x509ce.c @@ -326,9 +326,6 @@ static gint ett_x509ce_ScramblerCapabilities = -1; /*--- End of included file: packet-x509ce-ett.c ---*/ #line 53 "../../asn1/x509ce/packet-x509ce-template.c" -static const char *object_identifier_id; - - /*--- Included file: packet-x509ce-fn.c ---*/ #line 1 "../../asn1/x509ce/packet-x509ce-fn.c" @@ -345,7 +342,7 @@ dissect_x509ce_KeyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_x509ce_OtherNameType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); return offset; } @@ -355,7 +352,7 @@ dissect_x509ce_OtherNameType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_x509ce_OtherNameValue(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 181 "../../asn1/x509ce/x509ce.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -597,7 +594,7 @@ dissect_x509ce_CertPolicyId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_x509ce_T_policyQualifierId(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509ce_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509ce_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -607,7 +604,7 @@ dissect_x509ce_T_policyQualifierId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_x509ce_T_qualifier(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 171 "../../asn1/x509ce/x509ce.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1869,7 +1866,7 @@ static void dissect_CicamBrandId_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-x509ce-fn.c ---*/ -#line 57 "../../asn1/x509ce/packet-x509ce-template.c" +#line 54 "../../asn1/x509ce/packet-x509ce-template.c" /* CI+ (www.ci-plus.com) defines some X.509 certificate extensions that use OIDs which are not officially assigned @@ -2723,7 +2720,7 @@ void proto_register_x509ce(void) { NULL, HFILL }}, /*--- End of included file: packet-x509ce-hfarr.c ---*/ -#line 122 "../../asn1/x509ce/packet-x509ce-template.c" +#line 119 "../../asn1/x509ce/packet-x509ce-template.c" }; /* List of subtrees */ @@ -2793,7 +2790,7 @@ void proto_register_x509ce(void) { &ett_x509ce_ScramblerCapabilities, /*--- End of included file: packet-x509ce-ettarr.c ---*/ -#line 127 "../../asn1/x509ce/packet-x509ce-template.c" +#line 124 "../../asn1/x509ce/packet-x509ce-template.c" }; /* Register protocol */ @@ -2856,7 +2853,7 @@ void proto_reg_handoff_x509ce(void) { /*--- End of included file: packet-x509ce-dis-tab.c ---*/ -#line 142 "../../asn1/x509ce/packet-x509ce-template.c" +#line 139 "../../asn1/x509ce/packet-x509ce-template.c" register_ber_oid_dissector("2.5.29.24", dissect_x509ce_invalidityDate_callback, proto_x509ce, "id-ce-invalidityDate"); register_ber_oid_dissector("2.5.29.51", dissect_x509ce_baseUpdateTime_callback, proto_x509ce, "id-ce-baseUpdateTime"); } diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index db2a40c79c..2835de85b8 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -297,7 +297,6 @@ static gint ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString = -1; /*--- End of included file: packet-x509if-ett.c ---*/ #line 53 "../../asn1/x509if/packet-x509if-template.c" -static const char *object_identifier_id = NULL; static proto_tree *top_of_dn = NULL; static proto_tree *top_of_rdn = NULL; @@ -320,7 +319,6 @@ static char *last_ava = NULL; static void x509if_frame_end(void) { - object_identifier_id = NULL; top_of_dn = NULL; top_of_rdn = NULL; @@ -355,7 +353,7 @@ int dissect_x509if_AttributeCombination(gboolean implicit_tag _U_, tvbuff_t *tvb static int dissect_x509if_T_type(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -365,7 +363,7 @@ dissect_x509if_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ static int dissect_x509if_T_values_item(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 315 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -401,7 +399,7 @@ dissect_x509if_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_x509if_T_contextType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -411,7 +409,7 @@ dissect_x509if_T_contextType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_x509if_T_contextValues_item(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 297 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -523,7 +521,7 @@ dissect_x509if_Attribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse int dissect_x509if_AttributeType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -533,7 +531,7 @@ dissect_x509if_AttributeType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o int dissect_x509if_AttributeValue(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 303 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -544,7 +542,7 @@ dissect_x509if_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_x509if_T_type_01(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -554,7 +552,7 @@ dissect_x509if_T_type_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse static int dissect_x509if_T_assertion(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 309 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -574,7 +572,7 @@ dissect_x509if_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ static int dissect_x509if_T_ca_contextType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -584,7 +582,7 @@ dissect_x509if_T_ca_contextType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in static int dissect_x509if_T_ca_contextValues_item(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 186 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -726,13 +724,13 @@ dissect_x509if_T_type_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse const char *fmt; const char *name; - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); - if(object_identifier_id) { + if(actx->external.direct_reference) { /* see if we can find a nice name */ - name = oid_resolved_from_string(object_identifier_id); - if(!name) name = object_identifier_id; + name = oid_resolved_from_string(actx->external.direct_reference); + if(!name) name = actx->external.direct_reference; if(last_rdn) { /* append it to the RDN */ g_strlcat(last_rdn, name, MAX_RDN_STR_LEN); @@ -772,13 +770,13 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o char *value = NULL; const char *fmt; const char *name = NULL; - const char *orig_oid = object_identifier_id; + const char *orig_oid = actx->external.direct_reference; - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); /* in dissecting the value we may have overridden the OID of the value - which is a problem if there are multiple values */ - object_identifier_id = orig_oid; + actx->external.direct_reference = orig_oid; /* try and dissect as a string */ dissect_ber_octet_string(FALSE, actx, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb); @@ -804,8 +802,8 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o last_ava = (char *)wmem_alloc(wmem_packet_scope(), MAX_AVA_STR_LEN); } - if(!(name = oid_resolved_from_string(object_identifier_id))) - name = object_identifier_id; + if(!(name = oid_resolved_from_string(actx->external.direct_reference))) + name = actx->external.direct_reference; g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value); proto_item_append_text(tree, " %s", last_ava); @@ -823,7 +821,7 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_x509if_T_distingAttrValue(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 330 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1371,7 +1369,7 @@ dissect_x509if_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_x509if_T_attributeType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -1381,7 +1379,7 @@ dissect_x509if_T_attributeType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_x509if_T_ra_selectedValues_item(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 276 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1405,7 +1403,7 @@ dissect_x509if_T_ra_selectedValues(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_x509if_T_entryType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -1415,7 +1413,7 @@ dissect_x509if_T_entryType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_x509if_T_ra_values_item(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 282 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1467,7 +1465,7 @@ dissect_x509if_T_defaultValues(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_x509if_T_contextType_01(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -1477,7 +1475,7 @@ dissect_x509if_T_contextType_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in static int dissect_x509if_T_contextValue_item(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 321 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1568,7 +1566,7 @@ dissect_x509if_ContextCombination(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_x509if_T_restrictionType(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -1578,7 +1576,7 @@ dissect_x509if_T_restrictionType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i static int dissect_x509if_T_restrictionValue(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 327 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -1689,7 +1687,7 @@ dissect_x509if_AttributeCombination(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ static int dissect_x509if_T_attributeType_01(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_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509if_object_identifier_id, &actx->external.direct_reference); return offset; } @@ -1699,7 +1697,7 @@ dissect_x509if_T_attributeType_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_x509if_T_selectedValues_item(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 291 "../../asn1/x509if/x509if.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree); @@ -2098,7 +2096,7 @@ static void dissect_HierarchyBelow_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_ /*--- End of included file: packet-x509if-fn.c ---*/ -#line 91 "../../asn1/x509if/packet-x509if-template.c" +#line 89 "../../asn1/x509if/packet-x509if-template.c" const char * x509if_get_last_dn(void) { @@ -2764,7 +2762,7 @@ void proto_register_x509if(void) { NULL, HFILL }}, /*--- End of included file: packet-x509if-hfarr.c ---*/ -#line 136 "../../asn1/x509if/packet-x509if-template.c" +#line 134 "../../asn1/x509if/packet-x509if-template.c" }; /* List of subtrees */ @@ -2847,7 +2845,7 @@ void proto_register_x509if(void) { &ett_x509if_SET_SIZE_1_MAX_OF_DirectoryString, /*--- End of included file: packet-x509if-ettarr.c ---*/ -#line 141 "../../asn1/x509if/packet-x509if-template.c" +#line 139 "../../asn1/x509if/packet-x509if-template.c" }; /* Register protocol */ @@ -2905,6 +2903,6 @@ void proto_reg_handoff_x509if(void) { /*--- End of included file: packet-x509if-dis-tab.c ---*/ -#line 160 "../../asn1/x509if/packet-x509if-template.c" +#line 158 "../../asn1/x509if/packet-x509if-template.c" }