aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ocsp
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-05-13 20:58:29 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-05-13 20:58:29 +0000
commitc01f3829742dacd6d94dc50be54537661bad0581 (patch)
treeeb3da0d69d5bc62ca587ebd999b6beacd693f168 /asn1/ocsp
parentb80cb43018aa49bac3e24cabca009ca0471cd579 (diff)
Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
Diffstat (limited to 'asn1/ocsp')
-rw-r--r--asn1/ocsp/ocsp.cnf8
-rw-r--r--asn1/ocsp/packet-ocsp-template.c9
2 files changed, 11 insertions, 6 deletions
diff --git a/asn1/ocsp/ocsp.cnf b/asn1/ocsp/ocsp.cnf
index 1403eb688b..d34f2002ce 100644
--- a/asn1/ocsp/ocsp.cnf
+++ b/asn1/ocsp/ocsp.cnf
@@ -18,7 +18,7 @@ PKIX1Explicit88 pkix1explicit
#.REGISTER
BasicOCSPResponse B "1.3.6.1.5.5.7.48.1.1" "id-pkix-ocsp-basic"
-CrlID B "1.3.6.1.5.5.7.48.1.3" "id-pkix-ocsp-crl"
+CrlID B "1.3.6.1.5.5.7.48.1.3" "id-pkix-ocsp-crl"
AcceptableResponses B "1.3.6.1.5.5.7.48.1.4" "id-pkix-ocsp-response"
ArchiveCutoff B "1.3.6.1.5.5.7.48.1.6" "id-pkix-ocsp-archive-cutoff"
ServiceLocator B "1.3.6.1.5.5.7.48.1.7" "id-pkix-ocsp-service-locator"
@@ -38,8 +38,8 @@ ServiceLocator B "1.3.6.1.5.5.7.48.1.7" "id-pkix-ocsp-service-locator"
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(responseType_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(responseType_id, tvb, offset, actx->pinfo, tree);
#.END
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 ----------------------------------------------*/