aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/pkcs12
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/pkcs12
parentb80cb43018aa49bac3e24cabca009ca0471cd579 (diff)
Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
Diffstat (limited to 'asn1/pkcs12')
-rw-r--r--asn1/pkcs12/packet-pkcs12-template.c8
-rw-r--r--asn1/pkcs12/pkcs12.cnf20
2 files changed, 16 insertions, 12 deletions
diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c
index 7b4ac014b0..8d4ac23e48 100644
--- a/asn1/pkcs12/packet-pkcs12-template.c
+++ b/asn1/pkcs12/packet-pkcs12-template.c
@@ -88,17 +88,21 @@ static int strip_octet_string(tvbuff_t *tvb, proto_tree *tree)
static void dissect_AuthenticatedSafe_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
int offset = 0;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if((offset = strip_octet_string(tvb, tree)) > 0)
- dissect_pkcs12_AuthenticatedSafe(FALSE, tvb, offset, pinfo, tree, hf_pkcs12_AuthenticatedSafe_PDU);
+ dissect_pkcs12_AuthenticatedSafe(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkcs12_AuthenticatedSafe_PDU);
}
static void dissect_SafeContents_OCTETSTRING_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if((offset = strip_octet_string(tvb, tree)) > 0)
- dissect_pkcs12_SafeContents(FALSE, tvb, offset, pinfo, tree, hf_pkcs12_SafeContents_PDU);
+ dissect_pkcs12_SafeContents(FALSE, tvb, offset, &asn1_ctx, tree, hf_pkcs12_SafeContents_PDU);
}
#if 0
diff --git a/asn1/pkcs12/pkcs12.cnf b/asn1/pkcs12/pkcs12.cnf
index 4a86238dc4..6e60b9bc3a 100644
--- a/asn1/pkcs12/pkcs12.cnf
+++ b/asn1/pkcs12/pkcs12.cnf
@@ -15,11 +15,11 @@ PKCS-5 x509af
#.REGISTER
-KeyBag B "1.2.840.113549.1.12.10.1.1" "keyBag"
+KeyBag B "1.2.840.113549.1.12.10.1.1" "keyBag"
PKCS8ShroudedKeyBag B "1.2.840.113549.1.12.10.1.2" "pkcs8ShroudedKeyBag"
-CertBag B "1.2.840.113549.1.12.10.1.3" "certBag"
-SecretBag B "1.2.840.113549.1.12.10.1.4" "secretBag"
-CRLBag B "1.2.840.113549.1.12.10.1.5" "crlBag"
+CertBag B "1.2.840.113549.1.12.10.1.3" "certBag"
+SecretBag B "1.2.840.113549.1.12.10.1.4" "secretBag"
+CRLBag B "1.2.840.113549.1.12.10.1.5" "crlBag"
SafeContents B "1.2.840.113549.1.12.10.1.6" "safeContentsBag"
# PKCS#9 Attributes - see master list in x509sat.cnf
@@ -42,7 +42,7 @@ PBEParameter B "1.2.840.113549.1.5.10" "pbeWithSHA1AndDES-CBC"
PBEParameter B "1.2.840.113549.1.5.11" "pbeWithSHA1AndRC2-CBC"
PBKDF2Params B "1.2.840.113549.1.5.12" "id-PBKDF2"
-PBES2Params B "1.2.840.113549.1.5.13" "id-PBES2"
+PBES2Params B "1.2.840.113549.1.5.13" "id-PBES2"
PBMAC1Params B "1.2.840.113549.1.5.14" "id-PBMAC1"
#.NO_EMIT
@@ -94,23 +94,23 @@ AuthenticatedSafe
#.FN_BODY T_bagValue
if(object_identifier_id)
- offset = call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
#.FN_BODY T_attrValues_item
if(object_identifier_id)
- offset = call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
#.FN_BODY T_certValue
if(object_identifier_id)
- offset = call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
#.FN_BODY T_crlValue
if(object_identifier_id)
- offset = call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
#.FN_BODY T_secretValue
if(object_identifier_id)
- offset = call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+ offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
#.END