From f2716dada0527bcf200e628fd572514bd395fbfb Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Tue, 16 May 2000 19:53:50 +0000 Subject: Typesafety Thought Police Part 2. --- crypto/pkcs12/p12_sbag.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'crypto/pkcs12/p12_sbag.c') diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c index 1b3addece1..6ae209693d 100644 --- a/crypto/pkcs12/p12_sbag.c +++ b/crypto/pkcs12/p12_sbag.c @@ -81,8 +81,9 @@ int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) break; case NID_safeContentsBag: - M_ASN1_I2D_len_EXP_SEQUENCE_opt (a->value.safes, - i2d_PKCS12_SAFEBAG, 0, V_ASN1_SEQUENCE, v); + M_ASN1_I2D_len_EXP_SEQUENCE_opt_type + (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, + 0, V_ASN1_SEQUENCE, v); break; case NID_certBag: @@ -117,8 +118,9 @@ int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) break; case NID_safeContentsBag: - M_ASN1_I2D_put_EXP_SEQUENCE_opt (a->value.safes, - i2d_PKCS12_SAFEBAG, 0, V_ASN1_SEQUENCE, v); + M_ASN1_I2D_put_EXP_SEQUENCE_opt_type + (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, + 0, V_ASN1_SEQUENCE, v); break; case NID_certBag: @@ -175,9 +177,10 @@ PKCS12_SAFEBAG *d2i_PKCS12_SAFEBAG(PKCS12_SAFEBAG **a, unsigned char **pp, break; case NID_safeContentsBag: - M_ASN1_D2I_get_EXP_set_opt(ret->value.safes, - d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, - 0, V_ASN1_SEQUENCE); + M_ASN1_D2I_get_EXP_set_opt_type + (PKCS12_SAFEBAG, ret->value.safes, + d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, 0, + V_ASN1_SEQUENCE); break; case NID_certBag: @@ -225,3 +228,7 @@ void PKCS12_SAFEBAG_free (PKCS12_SAFEBAG *a) sk_X509_ATTRIBUTE_pop_free (a->attrib, X509_ATTRIBUTE_free); Free (a); } + +IMPLEMENT_STACK_OF(PKCS12_SAFEBAG) +IMPLEMENT_ASN1_SET_OF(PKCS12_SAFEBAG) +IMPLEMENT_PKCS12_STACK_OF(PKCS12_SAFEBAG) -- cgit v1.2.3