diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-05-13 20:58:29 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-05-13 20:58:29 +0000 |
commit | c01f3829742dacd6d94dc50be54537661bad0581 (patch) | |
tree | eb3da0d69d5bc62ca587ebd999b6beacd693f168 /asn1/x509af | |
parent | b80cb43018aa49bac3e24cabca009ca0471cd579 (diff) |
Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
Diffstat (limited to 'asn1/x509af')
-rw-r--r-- | asn1/x509af/packet-x509af-template.c | 5 | ||||
-rw-r--r-- | asn1/x509af/x509af.cnf | 26 |
2 files changed, 17 insertions, 14 deletions
diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c index a784b9b700..74b9f949ad 100644 --- a/asn1/x509af/packet-x509af-template.c +++ b/asn1/x509af/packet-x509af-template.c @@ -31,6 +31,7 @@ #include <epan/packet.h> #include <epan/conversation.h> #include <epan/oid_resolv.h> +#include <epan/asn1.h> #include <stdio.h> #include <string.h> @@ -71,6 +72,8 @@ dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) { proto_item *item=NULL; proto_tree *tree=NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKIX-CRL"); @@ -87,7 +90,7 @@ dissect_pkix_crl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) tree = proto_item_add_subtree(item, ett_pkix_crl); } - return dissect_x509af_CertificateList(FALSE, tvb, 0, pinfo, tree, -1); + return dissect_x509af_CertificateList(FALSE, tvb, 0, &asn1_ctx, tree, -1); } /*--- proto_register_x509af ----------------------------------------------*/ diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf index e8842d6c8b..c52ac2654e 100644 --- a/asn1/x509af/x509af.cnf +++ b/asn1/x509af/x509af.cnf @@ -34,15 +34,15 @@ Version #.PDU #.REGISTER -Certificate B "2.5.4.36" "id-at-userCertificate" -Certificate B "2.5.4.37" "id-at-cAcertificate" -CertificateList B "2.5.4.38" "id-at-authorityRevocationList" -CertificateList B "2.5.4.39" "id-at-certificateRevocationList" -CertificatePair B "2.5.4.40" "id-at-crossCertificatePair" -AttributeCertificate B "2.5.4.58" "id-at-attributeCertificate" -CertificateList B "2.5.4.59" "id-at-attributeCertificateRevocationList" - -DSS-Params B "1.2.840.10040.4.1" "id-dsa" +Certificate B "2.5.4.36" "id-at-userCertificate" +Certificate B "2.5.4.37" "id-at-cAcertificate" +CertificateList B "2.5.4.38" "id-at-authorityRevocationList" +CertificateList B "2.5.4.39" "id-at-certificateRevocationList" +CertificatePair B "2.5.4.40" "id-at-crossCertificatePair" +AttributeCertificate B "2.5.4.58" "id-at-attributeCertificate" +CertificateList B "2.5.4.59" "id-at-attributeCertificateRevocationList" + +DSS-Params B "1.2.840.10040.4.1" "id-dsa" #.NO_EMIT #.TYPE_RENAME @@ -77,7 +77,7 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate } #.FN_BODY AlgorithmIdentifier/parameters - offset=call_ber_oid_callback(algorithm_id, tvb, offset, pinfo, tree); + 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 @@ -99,9 +99,9 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate gint32 tag; guint32 len; /* skip past the T and L */ - offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag); - offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind); - offset=call_ber_oid_callback(extension_id, tvb, offset, pinfo, tree); + offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &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); #.FN_BODY SubjectName |