summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_crt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-12-31 01:13:04 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-12-31 01:13:04 +0000
commitecbe07817ab8fff2aca97eeb69fabdd5c54b4bda (patch)
tree71a101c30b45069272befb805c9b285059a4cd4b /crypto/pkcs12/p12_crt.c
parent71db02813c8d1ac2901be397ee4aa5f4dceabb17 (diff)
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).
Diffstat (limited to 'crypto/pkcs12/p12_crt.c')
-rw-r--r--crypto/pkcs12/p12_crt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/pkcs12/p12_crt.c b/crypto/pkcs12/p12_crt.c
index a8f7b48882..4c36c643ce 100644
--- a/crypto/pkcs12/p12_crt.c
+++ b/crypto/pkcs12/p12_crt.c
@@ -94,7 +94,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
}
/* Add user certificate */
- if(!(bag = M_PKCS12_x5092certbag(cert))) return NULL;
+ if(!(bag = PKCS12_x5092certbag(cert))) return NULL;
if(name && !PKCS12_add_friendlyname(bag, name, -1)) return NULL;
X509_digest(cert, EVP_sha1(), keyid, &keyidlen);
if(!PKCS12_add_localkeyid(bag, keyid, keyidlen)) return NULL;
@@ -108,7 +108,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
if(ca) {
for(i = 0; i < sk_X509_num(ca); i++) {
tcert = sk_X509_value(ca, i);
- if(!(bag = M_PKCS12_x5092certbag(tcert))) return NULL;
+ if(!(bag = PKCS12_x5092certbag(tcert))) return NULL;
if(!sk_PKCS12_SAFEBAG_push(bags, bag)) {
PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
return NULL;
@@ -152,7 +152,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
if(!(p12 = PKCS12_init (NID_pkcs7_data))) return NULL;
- if(!M_PKCS12_pack_authsafes (p12, safes)) return NULL;
+ if(!PKCS12_pack_authsafes (p12, safes)) return NULL;
sk_PKCS7_pop_free(safes, PKCS7_free);