diff options
-rw-r--r-- | asn1/cms/cms.cnf | 2 | ||||
-rw-r--r-- | asn1/pkcs12/packet-pkcs12-template.c | 2 | ||||
-rw-r--r-- | asn1/x509af/packet-x509af-template.c | 6 | ||||
-rw-r--r-- | asn1/x509af/packet-x509af-template.h | 2 | ||||
-rw-r--r-- | asn1/x509af/x509af.cnf | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-cms.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-pkcs12.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-x509af.c | 24 | ||||
-rw-r--r-- | epan/dissectors/packet-x509af.h | 2 |
9 files changed, 18 insertions, 34 deletions
diff --git a/asn1/cms/cms.cnf b/asn1/cms/cms.cnf index b2c81b09f4..3c2166ec27 100644 --- a/asn1/cms/cms.cnf +++ b/asn1/cms/cms.cnf @@ -154,7 +154,7 @@ RevocationInfoChoice/other otherRIC old_offset = get_ber_length(tvb, old_offset, NULL, NULL); if(content_tvb) - cms_verify_msg_digest(pi, content_tvb, x509af_get_last_algorithm_id(), tvb, old_offset); + cms_verify_msg_digest(pi, content_tvb, actx->external.direct_reference, tvb, old_offset); #.FN_PARS SMIMECapability/capability FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &object_identifier_id diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c index 85267e2b80..261a5cdd88 100644 --- a/asn1/pkcs12/packet-pkcs12-template.c +++ b/asn1/pkcs12/packet-pkcs12-template.c @@ -241,7 +241,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted return FALSE; } - encryption_algorithm = x509af_get_last_algorithm_id(); + encryption_algorithm = actx->external.direct_reference; /* these are the only encryption schemes we understand for now */ if(!strcmp(encryption_algorithm, PKCS12_PBE_3DES_SHA1_OID)) { diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c index 9641aa9bcc..7d20220a68 100644 --- a/asn1/x509af/packet-x509af-template.c +++ b/asn1/x509af/packet-x509af-template.c @@ -53,14 +53,8 @@ static int hf_x509af_extension_id = -1; /* Initialize the subtree pointers */ static gint ett_pkix_crl = -1; #include "packet-x509af-ett.c" -static const char *algorithm_id; #include "packet-x509af-fn.c" -const char *x509af_get_last_algorithm_id(void) { - return algorithm_id; -} - - static int dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) { diff --git a/asn1/x509af/packet-x509af-template.h b/asn1/x509af/packet-x509af-template.h index 41d0dd8612..15fa07af4e 100644 --- a/asn1/x509af/packet-x509af-template.h +++ b/asn1/x509af/packet-x509af-template.h @@ -28,7 +28,5 @@ #include "packet-x509af-exp.h" -extern const char* x509af_get_last_algorithm_id(void); - #endif /* PACKET_X509AF_H */ diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf index 38ddb1d3c0..1c092bd21e 100644 --- a/asn1/x509af/x509af.cnf +++ b/asn1/x509af/x509af.cnf @@ -65,21 +65,21 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate #.END #.FN_PARS AlgorithmIdentifier/algorithmId - FN_VARIANT = _str HF_INDEX = hf_x509af_algorithm_id VAL_PTR = &algorithm_id + FN_VARIANT = _str HF_INDEX = hf_x509af_algorithm_id VAL_PTR = &actx->external.direct_reference #.FN_BODY AlgorithmIdentifier/algorithmId const char *name; %(DEFAULT_BODY)s - if(algorithm_id) { - name = oid_resolved_from_string(algorithm_id); + if(actx->external.direct_reference) { + name = oid_resolved_from_string(actx->external.direct_reference); - proto_item_append_text(tree, " (%%s)", name ? name : algorithm_id); + proto_item_append_text(tree, " (%%s)", name ? name : actx->external.direct_reference); } #.FN_BODY AlgorithmIdentifier/parameters - offset=call_ber_oid_callback(algorithm_id, tvb, offset, actx->pinfo, tree, NULL); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL); #.FN_PARS Extension/extnId FN_VARIANT = _str HF_INDEX = hf_x509af_extension_id VAL_PTR = &actx->external.direct_reference diff --git a/epan/dissectors/packet-cms.c b/epan/dissectors/packet-cms.c index e0f7213620..3141902330 100644 --- a/epan/dissectors/packet-cms.c +++ b/epan/dissectors/packet-cms.c @@ -1530,7 +1530,7 @@ dissect_cms_MessageDigest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs old_offset = get_ber_length(tvb, old_offset, NULL, NULL); if(content_tvb) - cms_verify_msg_digest(pi, content_tvb, x509af_get_last_algorithm_id(), tvb, old_offset); + cms_verify_msg_digest(pi, content_tvb, actx->external.direct_reference, tvb, old_offset); diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c index 7b61be9cdf..36c6062d26 100644 --- a/epan/dissectors/packet-pkcs12.c +++ b/epan/dissectors/packet-pkcs12.c @@ -333,7 +333,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted return FALSE; } - encryption_algorithm = x509af_get_last_algorithm_id(); + encryption_algorithm = actx->external.direct_reference; /* these are the only encryption schemes we understand for now */ if(!strcmp(encryption_algorithm, PKCS12_PBE_3DES_SHA1_OID)) { diff --git a/epan/dissectors/packet-x509af.c b/epan/dissectors/packet-x509af.c index f97bc4216f..19ab3dd2c4 100644 --- a/epan/dissectors/packet-x509af.c +++ b/epan/dissectors/packet-x509af.c @@ -177,7 +177,6 @@ static gint ett_x509af_DSS_Params = -1; /*--- End of included file: packet-x509af-ett.c ---*/ #line 56 "../../asn1/x509af/packet-x509af-template.c" -static const char *algorithm_id; /*--- Included file: packet-x509af-fn.c ---*/ #line 1 "../../asn1/x509af/packet-x509af-fn.c" @@ -215,13 +214,13 @@ dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o #line 71 "../../asn1/x509af/x509af.cnf" const char *name; - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_x509af_algorithm_id, &actx->external.direct_reference); - if(algorithm_id) { - name = oid_resolved_from_string(algorithm_id); + if(actx->external.direct_reference) { + name = oid_resolved_from_string(actx->external.direct_reference); - proto_item_append_text(tree, " (%s)", name ? name : algorithm_id); + proto_item_append_text(tree, " (%s)", name ? name : actx->external.direct_reference); } @@ -234,7 +233,7 @@ dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o static int dissect_x509af_T_parameters(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 82 "../../asn1/x509af/x509af.cnf" - offset=call_ber_oid_callback(algorithm_id, tvb, offset, actx->pinfo, tree, NULL); + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL); @@ -887,12 +886,7 @@ static void dissect_DSS_Params_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pr /*--- End of included file: packet-x509af-fn.c ---*/ -#line 58 "../../asn1/x509af/packet-x509af-template.c" - -const char *x509af_get_last_algorithm_id(void) { - return algorithm_id; -} - +#line 57 "../../asn1/x509af/packet-x509af-template.c" static int dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) @@ -1229,7 +1223,7 @@ void proto_register_x509af(void) { "INTEGER", HFILL }}, /*--- End of included file: packet-x509af-hfarr.c ---*/ -#line 99 "../../asn1/x509af/packet-x509af-template.c" +#line 93 "../../asn1/x509af/packet-x509af-template.c" }; /* List of subtrees */ @@ -1272,7 +1266,7 @@ void proto_register_x509af(void) { &ett_x509af_DSS_Params, /*--- End of included file: packet-x509af-ettarr.c ---*/ -#line 105 "../../asn1/x509af/packet-x509af-template.c" +#line 99 "../../asn1/x509af/packet-x509af-template.c" }; /* Register protocol */ @@ -1315,7 +1309,7 @@ void proto_reg_handoff_x509af(void) { /*--- End of included file: packet-x509af-dis-tab.c ---*/ -#line 133 "../../asn1/x509af/packet-x509af-template.c" +#line 127 "../../asn1/x509af/packet-x509af-template.c" /*XXX these should really go to a better place but since that I have not that ITU standard, ill put it here for the time diff --git a/epan/dissectors/packet-x509af.h b/epan/dissectors/packet-x509af.h index 13ff245a45..760b8a9b4f 100644 --- a/epan/dissectors/packet-x509af.h +++ b/epan/dissectors/packet-x509af.h @@ -66,7 +66,5 @@ void dissect_x509af_Certificate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, p /*--- End of included file: packet-x509af-exp.h ---*/ #line 30 "../../asn1/x509af/packet-x509af-template.h" -extern const char* x509af_get_last_algorithm_id(void); - #endif /* PACKET_X509AF_H */ |