diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-02-23 03:16:09 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-02-23 03:16:09 +0000 |
commit | bb5ea36b962453c4d74dab15ac1897725a02707d (patch) | |
tree | 3bf427b77627b9c2a45c7f6288deda545822ccca /crypto/pkcs12/p12_utl.c | |
parent | e3a91640739c4c016e234550ed913e7f7f6970f9 (diff) |
Initial support for ASN1_ITEM_FUNCTION option to
change the way ASN1 modules are exported.
Still needs a bit of work for example the hack which a
dummy function prototype to avoid compilers warning about
multiple ;s.
Diffstat (limited to 'crypto/pkcs12/p12_utl.c')
-rw-r--r-- | crypto/pkcs12/p12_utl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/pkcs12/p12_utl.c b/crypto/pkcs12/p12_utl.c index 3953d54d36..243ec76be9 100644 --- a/crypto/pkcs12/p12_utl.c +++ b/crypto/pkcs12/p12_utl.c @@ -97,36 +97,36 @@ char *uni2asc(unsigned char *uni, int unilen) int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12) { - return ASN1_item_i2d_bio(&PKCS12_it, bp, p12); + return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); } #ifndef OPENSSL_NO_FP_API int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12) { - return ASN1_item_i2d_fp(&PKCS12_it, fp, p12); + return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); } #endif PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12) { - return ASN1_item_d2i_bio(&PKCS12_it, bp, p12); + return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS12), bp, p12); } #ifndef OPENSSL_NO_FP_API PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) { - return ASN1_item_d2i_fp(&PKCS12_it, fp, p12); + return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS12), fp, p12); } #endif PKCS12_SAFEBAG *PKCS12_x5092certbag(X509 *x509) { - return PKCS12_item_pack_safebag(x509, &X509_it, + return PKCS12_item_pack_safebag(x509, ASN1_ITEM_rptr(X509), NID_x509Certificate, NID_certBag); } PKCS12_SAFEBAG *PKCS12_x509crl2certbag(X509_CRL *crl) { - return PKCS12_item_pack_safebag(crl, &X509_CRL_it, + return PKCS12_item_pack_safebag(crl, ASN1_ITEM_rptr(X509_CRL), NID_x509Crl, NID_crlBag); } @@ -134,7 +134,7 @@ X509 *PKCS12_certbag2x509(PKCS12_SAFEBAG *bag) { if(M_PKCS12_bag_type(bag) != NID_certBag) return NULL; if(M_PKCS12_cert_bag_type(bag) != NID_x509Certificate) return NULL; - return ASN1_item_unpack(bag->value.bag->value.octet, &X509_it); + return ASN1_item_unpack(bag->value.bag->value.octet, ASN1_ITEM_rptr(X509)); } X509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag) @@ -142,5 +142,5 @@ X509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag) if(M_PKCS12_bag_type(bag) != NID_crlBag) return NULL; if(M_PKCS12_cert_bag_type(bag) != NID_x509Crl) return NULL; return ASN1_item_unpack(bag->value.bag->value.octet, - &X509_CRL_it); + ASN1_ITEM_rptr(X509_CRL)); } |