summaryrefslogtreecommitdiff
path: root/asn1/x509af
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-01-27 09:02:06 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2014-01-27 09:02:06 +0000
commitface757db3169f8f9964c7fd31250cf67c6764cb (patch)
tree4e878c303482949502bf67a9f5da6cf38073994b /asn1/x509af
parentb48a2db7d1b3518b37197298fdd59cea3479fb54 (diff)
downloadwireshark-face757db3169f8f9964c7fd31250cf67c6764cb.tar.gz
Added back x509af_get_last_algorithm_id() removed in revision 54647 to
restore usage in cms and pkcs12. They never got a valid value in actx->external.direct_reference because they use another actx in this case. This will add back the global variable in x509af, but this is needed until we manage to pass the value in another way. See comments in bug 9573. svn path=/trunk/; revision=54975
Diffstat (limited to 'asn1/x509af')
-rw-r--r--asn1/x509af/packet-x509af-template.c6
-rw-r--r--asn1/x509af/packet-x509af-template.h2
-rw-r--r--asn1/x509af/x509af.cnf2
3 files changed, 10 insertions, 0 deletions
diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c
index 7d20220a68..9641aa9bcc 100644
--- a/asn1/x509af/packet-x509af-template.c
+++ b/asn1/x509af/packet-x509af-template.c
@@ -53,8 +53,14 @@ 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 15fa07af4e..41d0dd8612 100644
--- a/asn1/x509af/packet-x509af-template.h
+++ b/asn1/x509af/packet-x509af-template.h
@@ -28,5 +28,7 @@
#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 1c092bd21e..b532a45b9f 100644
--- a/asn1/x509af/x509af.cnf
+++ b/asn1/x509af/x509af.cnf
@@ -72,6 +72,8 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate
%(DEFAULT_BODY)s
+ algorithm_id = actx->external.direct_reference;
+
if(actx->external.direct_reference) {
name = oid_resolved_from_string(actx->external.direct_reference);