Use sk_*_new_null() instead of sk_*_new(NULL), since that takes care
authorRichard Levitte <levitte@openssl.org>
Sun, 17 Sep 2000 18:21:27 +0000 (18:21 +0000)
committerRichard Levitte <levitte@openssl.org>
Sun, 17 Sep 2000 18:21:27 +0000 (18:21 +0000)
of complaints from the compiler about data pointers and function
pointers not being compatible with each other.

23 files changed:
apps/apps.c
apps/crl2p7.c
apps/nseq.c
apps/pkcs12.c
crypto/asn1/a_set.c
crypto/dso/dso_lib.c
crypto/pkcs12/p12_attr.c
crypto/pkcs12/p12_crt.c
crypto/pkcs12/p12_kiss.c
crypto/pkcs12/p12_npas.c
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pk7_mime.c
crypto/pkcs7/pk7_smime.c
crypto/x509v3/v3_akey.c
crypto/x509v3/v3_alt.c
crypto/x509v3/v3_crld.c
crypto/x509v3/v3_extku.c
crypto/x509v3/v3_genn.c
crypto/x509v3/v3_info.c
crypto/x509v3/v3_utl.c
ssl/ssl_cert.c
ssl/ssl_ciph.c
ssl/ssl_lib.c

index e5a42d4..c22550b 100644 (file)
@@ -660,7 +660,7 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format)
 
        if      (format == FORMAT_PEM)
                {
 
        if      (format == FORMAT_PEM)
                {
-               othercerts = sk_X509_new(NULL);
+               othercerts = sk_X509_new_null();
                if(!othercerts)
                        {
                        sk_X509_free(othercerts);
                if(!othercerts)
                        {
                        sk_X509_free(othercerts);
index ebf5fe9..d028627 100644 (file)
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
                else if (strcmp(*argv,"-certfile") == 0)
                        {
                        if (--argc < 1) goto bad;
                else if (strcmp(*argv,"-certfile") == 0)
                        {
                        if (--argc < 1) goto bad;
-                       if(!certflst) certflst = sk_new(NULL);
+                       if(!certflst) certflst = sk_new_null();
                        sk_push(certflst,*(++argv));
                        }
                else
                        sk_push(certflst,*(++argv));
                        }
                else
@@ -215,7 +215,7 @@ bad:
        p7s->contents->type=OBJ_nid2obj(NID_pkcs7_data);
 
        if (!ASN1_INTEGER_set(p7s->version,1)) goto end;
        p7s->contents->type=OBJ_nid2obj(NID_pkcs7_data);
 
        if (!ASN1_INTEGER_set(p7s->version,1)) goto end;
-       if ((crl_stack=sk_X509_CRL_new(NULL)) == NULL) goto end;
+       if ((crl_stack=sk_X509_CRL_new_null()) == NULL) goto end;
        p7s->crl=crl_stack;
        if (crl != NULL)
                {
        p7s->crl=crl_stack;
        if (crl != NULL)
                {
@@ -223,7 +223,7 @@ bad:
                crl=NULL; /* now part of p7 for OPENSSL_freeing */
                }
 
                crl=NULL; /* now part of p7 for OPENSSL_freeing */
                }
 
-       if ((cert_stack=sk_X509_new(NULL)) == NULL) goto end;
+       if ((cert_stack=sk_X509_new_null()) == NULL) goto end;
        p7s->cert=cert_stack;
 
        if(certflst) for(i = 0; i < sk_num(certflst); i++) {
        p7s->cert=cert_stack;
 
        if(certflst) for(i = 0; i < sk_num(certflst); i++) {
index cc88d50..7210fbd 100644 (file)
@@ -123,7 +123,7 @@ int MAIN(int argc, char **argv)
 
        if (toseq) {
                seq = NETSCAPE_CERT_SEQUENCE_new();
 
        if (toseq) {
                seq = NETSCAPE_CERT_SEQUENCE_new();
-               seq->certs = sk_X509_new(NULL);
+               seq->certs = sk_X509_new_null();
                while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) 
                    sk_X509_push(seq->certs,x509);
 
                while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) 
                    sk_X509_push(seq->certs,x509);
 
index 0f3ac49..2611395 100644 (file)
@@ -197,7 +197,7 @@ int MAIN(int argc, char **argv)
                } else if (!strcmp (*args, "-caname")) {
                    if (args[1]) {
                        args++; 
                } else if (!strcmp (*args, "-caname")) {
                    if (args[1]) {
                        args++; 
-                       if (!canames) canames = sk_new(NULL);
+                       if (!canames) canames = sk_new_null();
                        sk_push(canames, *args);
                    } else badarg = 1;
                } else if (!strcmp (*args, "-in")) {
                        sk_push(canames, *args);
                    } else badarg = 1;
                } else if (!strcmp (*args, "-in")) {
@@ -404,7 +404,7 @@ int MAIN(int argc, char **argv)
        CRYPTO_push_info("reading certs from input");
 #endif
 
        CRYPTO_push_info("reading certs from input");
 #endif
 
-       certs = sk_X509_new(NULL);
+       certs = sk_X509_new_null();
 
        /* Load in all certs in input file */
        if(!cert_load(in, certs)) {
 
        /* Load in all certs in input file */
        if(!cert_load(in, certs)) {
@@ -436,7 +436,7 @@ int MAIN(int argc, char **argv)
        CRYPTO_push_info("reading certs from certfile");
 #endif
 
        CRYPTO_push_info("reading certs from certfile");
 #endif
 
-       bags = sk_PKCS12_SAFEBAG_new (NULL);
+       bags = sk_PKCS12_SAFEBAG_new_null ();
 
        /* Add any more certificates asked for */
        if (certsin) {
 
        /* Add any more certificates asked for */
        if (certsin) {
@@ -527,7 +527,7 @@ int MAIN(int argc, char **argv)
                goto export_end;
        }
 
                goto export_end;
        }
 
-       safes = sk_PKCS7_new (NULL);
+       safes = sk_PKCS7_new_null ();
        sk_PKCS7_push (safes, authsafe);
 
 #ifdef CRYPTO_MDEBUG
        sk_PKCS7_push (safes, authsafe);
 
 #ifdef CRYPTO_MDEBUG
@@ -543,7 +543,7 @@ int MAIN(int argc, char **argv)
        p8 = NULL;
         if (name) PKCS12_add_friendlyname (bag, name, -1);
        PKCS12_add_localkeyid (bag, keyid, keyidlen);
        p8 = NULL;
         if (name) PKCS12_add_friendlyname (bag, name, -1);
        PKCS12_add_localkeyid (bag, keyid, keyidlen);
-       bags = sk_PKCS12_SAFEBAG_new(NULL);
+       bags = sk_PKCS12_SAFEBAG_new_null();
        sk_PKCS12_SAFEBAG_push (bags, bag);
 
 #ifdef CRYPTO_MDEBUG
        sk_PKCS12_SAFEBAG_push (bags, bag);
 
 #ifdef CRYPTO_MDEBUG
index 1921f5e..caf5a14 100644 (file)
@@ -158,7 +158,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
        STACK *ret=NULL;
 
        if ((a == NULL) || ((*a) == NULL))
        STACK *ret=NULL;
 
        if ((a == NULL) || ((*a) == NULL))
-               { if ((ret=sk_new(NULL)) == NULL) goto err; }
+               { if ((ret=sk_new_null()) == NULL) goto err; }
        else
                ret=(*a);
 
        else
                ret=(*a);
 
index d1d50cc..acd1666 100644 (file)
@@ -107,8 +107,8 @@ DSO *DSO_new_method(DSO_METHOD *meth)
                return(NULL);
                }
        memset(ret, 0, sizeof(DSO));
                return(NULL);
                }
        memset(ret, 0, sizeof(DSO));
-       ret->meth_data = sk_new(NULL);
-       if((ret->meth_data = sk_new(NULL)) == NULL)
+       ret->meth_data = sk_new_null();
+       if((ret->meth_data = sk_new_null()) == NULL)
                {
                /* sk_new doesn't generate any errors so we do */
                DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE);
                {
                /* sk_new doesn't generate any errors so we do */
                DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE);
index b370c9c..f1a210b 100644 (file)
@@ -87,13 +87,13 @@ int PKCS12_add_localkeyid (PKCS12_SAFEBAG *bag, unsigned char *name,
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_localKeyID);
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_localKeyID);
-       if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
+       if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
                PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,keyid);
        attrib->set = 1;
                PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,keyid);
        attrib->set = 1;
-       if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) {
+       if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) {
                PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
                return 0;
        }
                PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
                return 0;
        }
@@ -129,14 +129,14 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage)
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_key_usage);
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_key_usage);
-       if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
+       if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
                PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,keyid);
        attrib->set = 1;
        if (!p8->attributes
                PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,keyid);
        attrib->set = 1;
        if (!p8->attributes
-           && !(p8->attributes = sk_X509_ATTRIBUTE_new (NULL))) {
+           && !(p8->attributes = sk_X509_ATTRIBUTE_new_null ())) {
                PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
                return 0;
        }
                PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
                return 0;
        }
@@ -195,14 +195,14 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag,
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_friendlyName);
                return 0;
        }
        attrib->object = OBJ_nid2obj(NID_friendlyName);
-       if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
+       if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
                PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME,
                                                        ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,fname);
        attrib->set = 1;
                PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME,
                                                        ERR_R_MALLOC_FAILURE);
                return 0;
        }
        sk_ASN1_TYPE_push (attrib->value.set,fname);
        attrib->set = 1;
-       if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) {
+       if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) {
                PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI,
                                                        ERR_R_MALLOC_FAILURE);
                return 0;
                PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI,
                                                        ERR_R_MALLOC_FAILURE);
                return 0;
index 5641a00..a8f7b48 100644 (file)
@@ -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(!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;
        }
                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 (!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;
           || !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;
        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;
           || !sk_PKCS12_SAFEBAG_push (bags, bag)) {
                PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
                return NULL;
index 368c987..1fbbd6c 100644 (file)
@@ -93,7 +93,7 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
 
        /* Allocate stack for ca certificates if needed */
        if ((ca != NULL) && (*ca == NULL)) {
 
        /* Allocate stack for ca certificates if needed */
        if ((ca != NULL) && (*ca == NULL)) {
-               if (!(*ca = sk_X509_new(NULL))) {
+               if (!(*ca = sk_X509_new_null())) {
                        PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE);
                        return 0;
                }
                        PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE);
                        return 0;
                }
index eed494a..84e31a7 100644 (file)
@@ -114,7 +114,7 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass)
        unsigned int maclen;
 
        if (!(asafes = M_PKCS12_unpack_authsafes(p12))) return 0;
        unsigned int maclen;
 
        if (!(asafes = M_PKCS12_unpack_authsafes(p12))) return 0;
-       if(!(newsafes = sk_PKCS7_new(NULL))) return 0;
+       if(!(newsafes = sk_PKCS7_new_null())) return 0;
        for (i = 0; i < sk_PKCS7_num (asafes); i++) {
                p7 = sk_PKCS7_value(asafes, i);
                bagnid = OBJ_obj2nid(p7->type);
        for (i = 0; i < sk_PKCS7_num (asafes); i++) {
                p7 = sk_PKCS7_value(asafes, i);
                bagnid = OBJ_obj2nid(p7->type);
index 2768247..099e965 100644 (file)
@@ -909,7 +909,7 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
 
        if (*sk == NULL)
                {
 
        if (*sk == NULL)
                {
-               *sk = sk_X509_ATTRIBUTE_new(NULL);
+               *sk = sk_X509_ATTRIBUTE_new_null();
 new_attrib:
                attr=X509_ATTRIBUTE_create(nid,atrtype,value);
                sk_X509_ATTRIBUTE_push(*sk,attr);
 new_attrib:
                attr=X509_ATTRIBUTE_create(nid,atrtype,value);
                sk_X509_ATTRIBUTE_push(*sk,attr);
index a7b6929..994473c 100644 (file)
@@ -372,7 +372,7 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
        part = 0;
        state = 0;
        first = 1;
        part = 0;
        state = 0;
        first = 1;
-       parts = sk_BIO_new(NULL);
+       parts = sk_BIO_new_null();
        *ret = parts;
        while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
                state = mime_bound_check(linebuf, len, bound, blen);
        *ret = parts;
        while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
                state = mime_bound_check(linebuf, len, bound, blen);
index c8cd5a7..2ececcd 100644 (file)
@@ -111,7 +111,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
                /* Add SMIMECapabilities */
                if(!(flags & PKCS7_NOSMIMECAP))
                {
                /* Add SMIMECapabilities */
                if(!(flags & PKCS7_NOSMIMECAP))
                {
-               if(!(smcap = sk_X509_ALGOR_new(NULL))) {
+               if(!(smcap = sk_X509_ALGOR_new_null())) {
                        PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
                        return NULL;
                }
                        PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
                        return NULL;
                }
@@ -285,7 +285,7 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
                PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE);
                return NULL;
        }
                PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE);
                return NULL;
        }
-       if(!(signers = sk_X509_new(NULL))) {
+       if(!(signers = sk_X509_new_null())) {
                PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
                PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
index 877ae7d..0889a18 100644 (file)
@@ -224,7 +224,7 @@ if((issuer && !ikeyid) || (issuer == 2)) {
 if(!(akeyid = AUTHORITY_KEYID_new())) goto err;
 
 if(isname) {
 if(!(akeyid = AUTHORITY_KEYID_new())) goto err;
 
 if(isname) {
-       if(!(gens = sk_GENERAL_NAME_new(NULL)) || !(gen = GENERAL_NAME_new())
+       if(!(gens = sk_GENERAL_NAME_new_null()) || !(gen = GENERAL_NAME_new())
                || !sk_GENERAL_NAME_push(gens, gen)) {
                X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE);
                goto err;
                || !sk_GENERAL_NAME_push(gens, gen)) {
                X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE);
                goto err;
index 5ccd1e0..733919f 100644 (file)
@@ -160,7 +160,7 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method,
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
-       if(!(gens = sk_GENERAL_NAME_new(NULL))) {
+       if(!(gens = sk_GENERAL_NAME_new_null())) {
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
@@ -225,7 +225,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method,
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
-       if(!(gens = sk_GENERAL_NAME_new(NULL))) {
+       if(!(gens = sk_GENERAL_NAME_new_null())) {
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
@@ -304,7 +304,7 @@ STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method,
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
        STACK_OF(GENERAL_NAME) *gens = NULL;
        CONF_VALUE *cnf;
        int i;
-       if(!(gens = sk_GENERAL_NAME_new(NULL))) {
+       if(!(gens = sk_GENERAL_NAME_new_null())) {
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
                X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
index 5ca5373..67feea4 100644 (file)
@@ -109,7 +109,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method,
        GENERAL_NAME *gen = NULL;
        CONF_VALUE *cnf;
        int i;
        GENERAL_NAME *gen = NULL;
        CONF_VALUE *cnf;
        int i;
-       if(!(crld = sk_DIST_POINT_new(NULL))) goto merr;
+       if(!(crld = sk_DIST_POINT_new_null())) goto merr;
        for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
                DIST_POINT *point;
                cnf = sk_CONF_VALUE_value(nval, i);
        for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
                DIST_POINT *point;
                cnf = sk_CONF_VALUE_value(nval, i);
index e039d21..53ec40a 100644 (file)
@@ -129,7 +129,7 @@ ASN1_OBJECT *objtmp;
 CONF_VALUE *val;
 int i;
 
 CONF_VALUE *val;
 int i;
 
-if(!(extku = sk_ASN1_OBJECT_new(NULL))) {
+if(!(extku = sk_ASN1_OBJECT_new_null())) {
        X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE);
        return NULL;
 }
        X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE);
        return NULL;
 }
index 2de1c4b..d447514 100644 (file)
@@ -220,7 +220,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a)
 
 STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new()
 {
 
 STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new()
 {
-       return sk_GENERAL_NAME_new(NULL);
+       return sk_GENERAL_NAME_new_null();
 }
 
 void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a)
 }
 
 void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a)
index 9ada0b3..a045a62 100644 (file)
@@ -119,7 +119,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
        ACCESS_DESCRIPTION *acc;
        int i, objlen;
        char *objtmp, *ptmp;
        ACCESS_DESCRIPTION *acc;
        int i, objlen;
        char *objtmp, *ptmp;
-       if(!(ainfo = sk_ACCESS_DESCRIPTION_new(NULL))) {
+       if(!(ainfo = sk_ACCESS_DESCRIPTION_new_null())) {
                X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
                X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
                return NULL;
        }
@@ -209,7 +209,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
 
 STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void)
 {
 
 STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void)
 {
-       return sk_ACCESS_DESCRIPTION_new(NULL);
+       return sk_ACCESS_DESCRIPTION_new_null();
 }
 
 void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a)
 }
 
 void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a)
index e6e99b2..619f161 100644 (file)
@@ -80,7 +80,7 @@ int X509V3_add_value(const char *name, const char *value,
        if(name && !(tname = BUF_strdup(name))) goto err;
        if(value && !(tvalue = BUF_strdup(value))) goto err;;
        if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err;
        if(name && !(tname = BUF_strdup(name))) goto err;
        if(value && !(tvalue = BUF_strdup(value))) goto err;;
        if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err;
-       if(!*extlist && !(*extlist = sk_CONF_VALUE_new(NULL))) goto err;
+       if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err;
        vtmp->section = NULL;
        vtmp->name = tname;
        vtmp->value = tvalue;
        vtmp->section = NULL;
        vtmp->name = tname;
        vtmp->value = tvalue;
index 7579a34..c26df62 100644 (file)
@@ -589,7 +589,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
        X509_NAME *xn=NULL;
        STACK_OF(X509_NAME) *ret,*sk;
 
        X509_NAME *xn=NULL;
        STACK_OF(X509_NAME) *ret,*sk;
 
-       ret=sk_X509_NAME_new(NULL);
+       ret=sk_X509_NAME_new_null();
        sk=sk_X509_NAME_new(xname_cmp);
 
        in=BIO_new(BIO_s_file_internal());
        sk=sk_X509_NAME_new(xname_cmp);
 
        in=BIO_new(BIO_s_file_internal());
index ce73213..f63163f 100644 (file)
@@ -799,7 +799,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
         * Allocate new "cipherstack" for the result, return with error
         * if we cannot get one.
         */
         * Allocate new "cipherstack" for the result, return with error
         * if we cannot get one.
         */
-       if ((cipherstack = sk_SSL_CIPHER_new(NULL)) == NULL)
+       if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL)
                {
                OPENSSL_free(list);
                return(NULL);
                {
                OPENSSL_free(list);
                return(NULL);
index 1483fad..635b250 100644 (file)
@@ -1036,7 +1036,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
                return(NULL);
                }
        if ((skp == NULL) || (*skp == NULL))
                return(NULL);
                }
        if ((skp == NULL) || (*skp == NULL))
-               sk=sk_SSL_CIPHER_new(NULL); /* change perhaps later */
+               sk=sk_SSL_CIPHER_new_null(); /* change perhaps later */
        else
                {
                sk= *skp;
        else
                {
                sk= *skp;