diff options
author | Michael Mann <mmann78@netscape.net> | 2014-01-08 04:55:59 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-01-08 04:55:59 +0000 |
commit | 92a567f20d2d45db3ed0bfb9a3a8a09dc5db76db (patch) | |
tree | a5cab4590056f8e0684de70c56559a7b3717e76f /asn1/x509af | |
parent | bf284da2eef917f8bf55be3aad15bb296072bb77 (diff) |
Make global algorithm_id in x509af dissector a direct_reference instead. Bug 9573 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9573). Removes valgrind warnings as well as just being Good Code.
svn path=/trunk/; revision=54647
Diffstat (limited to 'asn1/x509af')
-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 |
3 files changed, 5 insertions, 13 deletions
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 |