From ecbe07817ab8fff2aca97eeb69fabdd5c54b4bda Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 31 Dec 2000 01:13:04 +0000 Subject: Rewrite PKCS#12 code and remove some of the old horrible macros. Fix two evil ASN1 bugs. Attempt to use 'ctx' when NULL if input is indefinite length constructed in asn1_check_tlen() and invalid pointer to ASN1_TYPE when reusing existing structure (this took *ages* to find because the new PKCS#12 code triggered it). --- crypto/pkcs12/p12_asn.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crypto/pkcs12/p12_asn.c') diff --git a/crypto/pkcs12/p12_asn.c b/crypto/pkcs12/p12_asn.c index cbee733..860a6bb 100644 --- a/crypto/pkcs12/p12_asn.c +++ b/crypto/pkcs12/p12_asn.c @@ -112,3 +112,14 @@ ASN1_SEQUENCE(PKCS12_SAFEBAG) = { } ASN1_SEQUENCE_END(PKCS12_SAFEBAG); IMPLEMENT_ASN1_FUNCTIONS(PKCS12_SAFEBAG) + +/* SEQUENCE OF SafeBag */ +ASN1_ITEM_TEMPLATE(PKCS12_SAFEBAGS) = + ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, PKCS12_SAFEBAGS, PKCS12_SAFEBAG) +ASN1_ITEM_TEMPLATE_END(PKCS12_SAFEBAGS); + +/* Authsafes: SEQUENCE OF PKCS7 */ +ASN1_ITEM_TEMPLATE(PKCS12_AUTHSAFES) = + ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, PKCS12_AUTHSAFES, PKCS7) +ASN1_ITEM_TEMPLATE_END(PKCS12_AUTHSAFES); + -- cgit v1.1