From 62324627aa3309e4f72e3ff0241801f4286fa242 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 17 Sep 2000 18:21:27 +0000 Subject: Use sk_*_new_null() instead of sk_*_new(NULL), since that takes care of complaints from the compiler about data pointers and function pointers not being compatible with each other. --- crypto/pkcs12/p12_crt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/pkcs12/p12_crt.c') diff --git a/crypto/pkcs12/p12_crt.c b/crypto/pkcs12/p12_crt.c index 5641a00898..a8f7b48882 100644 --- a/crypto/pkcs12/p12_crt.c +++ b/crypto/pkcs12/p12_crt.c @@ -88,7 +88,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, if(!X509_check_private_key(cert, pkey)) return NULL; - if(!(bags = sk_PKCS12_SAFEBAG_new (NULL))) { + if(!(bags = sk_PKCS12_SAFEBAG_new_null ())) { PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); return NULL; } @@ -123,7 +123,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, if (!authsafe) return NULL; - if(!(safes = sk_PKCS7_new (NULL)) + if(!(safes = sk_PKCS7_new_null ()) || !sk_PKCS7_push(safes, authsafe)) { PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); return NULL; @@ -137,7 +137,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, PKCS8_PRIV_KEY_INFO_free(p8); if (name && !PKCS12_add_friendlyname (bag, name, -1)) return NULL; if(!PKCS12_add_localkeyid (bag, keyid, keyidlen)) return NULL; - if(!(bags = sk_PKCS12_SAFEBAG_new(NULL)) + if(!(bags = sk_PKCS12_SAFEBAG_new_null()) || !sk_PKCS12_SAFEBAG_push (bags, bag)) { PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE); return NULL; -- cgit v1.2.3