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/ocsp/packet-ocsp-template.c | |
parent | b80cb43018aa49bac3e24cabca009ca0471cd579 (diff) | |
download | wireshark-c01f3829742dacd6d94dc50be54537661bad0581.tar.gz |
Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
Diffstat (limited to 'asn1/ocsp/packet-ocsp-template.c')
-rw-r--r-- | asn1/ocsp/packet-ocsp-template.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/asn1/ocsp/packet-ocsp-template.c b/asn1/ocsp/packet-ocsp-template.c index f79d020172..d5bd0a12a0 100644 --- a/asn1/ocsp/packet-ocsp-template.c +++ b/asn1/ocsp/packet-ocsp-template.c @@ -32,6 +32,7 @@ #include <stdio.h> #include <string.h> +#include <asn1.h> #include "packet-ber.h" #include "packet-ocsp.h" @@ -64,6 +65,8 @@ dissect_ocsp_request(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, "OCSP"); @@ -80,7 +83,7 @@ dissect_ocsp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) tree = proto_item_add_subtree(item, ett_ocsp); } - return dissect_ocsp_OCSPRequest(FALSE, tvb, 0, pinfo, tree, -1); + return dissect_ocsp_OCSPRequest(FALSE, tvb, 0, &asn1_ctx, tree, -1); } @@ -89,6 +92,8 @@ dissect_ocsp_response(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, "OCSP"); @@ -105,7 +110,7 @@ dissect_ocsp_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree tree = proto_item_add_subtree(item, ett_ocsp); } - return dissect_ocsp_OCSPResponse(FALSE, tvb, 0, pinfo, tree, -1); + return dissect_ocsp_OCSPResponse(FALSE, tvb, 0, &asn1_ctx, tree, -1); } /*--- proto_register_ocsp ----------------------------------------------*/ |