aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x509af
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-05-01 20:54:31 +0000
committerMichael Mann <mmann78@netscape.net>2013-05-01 20:54:31 +0000
commitb787f03df35e6ea3112014227b3078affa1768b3 (patch)
treee4bbc68759a801777337eb9bb2399f03cf274073 /asn1/x509af
parentbf579224ae30b015206d602d976998c8bbab06f3 (diff)
Remove some global variables in favor of private_data member of asn1_ctx_t. Bug 7060 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7060). This should (mostly) passify the bug, but it appears like this could be done with a lot more ASN.1 dissectors.
svn path=/trunk/; revision=49117
Diffstat (limited to 'asn1/x509af')
-rw-r--r--asn1/x509af/packet-x509af-template.c3
-rw-r--r--asn1/x509af/x509af.cnf10
2 files changed, 5 insertions, 8 deletions
diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c
index a91d606798..9641aa9bcc 100644
--- a/asn1/x509af/packet-x509af-template.c
+++ b/asn1/x509af/packet-x509af-template.c
@@ -53,10 +53,7 @@ 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;
-static const char *extension_id;
-
#include "packet-x509af-fn.c"
const char *x509af_get_last_algorithm_id(void) {
diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf
index 48acb47a2a..346f1745d4 100644
--- a/asn1/x509af/x509af.cnf
+++ b/asn1/x509af/x509af.cnf
@@ -82,17 +82,17 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
offset=call_ber_oid_callback(algorithm_id, tvb, offset, actx->pinfo, tree);
#.FN_PARS Extension/extnId
- FN_VARIANT = _str HF_INDEX = hf_x509af_extension_id VAL_PTR = &extension_id
+ FN_VARIANT = _str HF_INDEX = hf_x509af_extension_id VAL_PTR = (const char**)&actx->private_data
#.FN_BODY Extension/extnId
const char *name;
%(DEFAULT_BODY)s
- if(extension_id) {
- name = oid_resolved_from_string(extension_id);
+ if(actx->private_data) {
+ name = oid_resolved_from_string((const char*)actx->private_data);
- proto_item_append_text(tree, " (%%s)", name ? name : extension_id);
+ proto_item_append_text(tree, " (%%s)", name ? name : actx->private_data);
}
#.FN_BODY Extension/extnValue
@@ -103,7 +103,7 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
/* skip past the T and L */
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
- offset=call_ber_oid_callback(extension_id, tvb, offset, actx->pinfo, tree);
+ offset=call_ber_oid_callback((const char*)actx->private_data, tvb, offset, actx->pinfo, tree);
#.FN_BODY SubjectName