summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-09-17 18:21:27 +0000
committerRichard Levitte <levitte@openssl.org>2000-09-17 18:21:27 +0000
commit62324627aa3309e4f72e3ff0241801f4286fa242 (patch)
treebcc120d30197a60057eabeee2f438b214d0df73a /apps
parent623eea376a7bff6d50c88407c10f279e6f838de4 (diff)
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.
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c2
-rw-r--r--apps/crl2p7.c6
-rw-r--r--apps/nseq.c2
-rw-r--r--apps/pkcs12.c10
4 files changed, 10 insertions, 10 deletions
diff --git a/apps/apps.c b/apps/apps.c
index e5a42d4d97..c22550b294 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -660,7 +660,7 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format)
if (format == FORMAT_PEM)
{
- othercerts = sk_X509_new(NULL);
+ othercerts = sk_X509_new_null();
if(!othercerts)
{
sk_X509_free(othercerts);
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index ebf5fe90ec..d02862710d 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
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
@@ -215,7 +215,7 @@ bad:
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)
{
@@ -223,7 +223,7 @@ bad:
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++) {
diff --git a/apps/nseq.c b/apps/nseq.c
index cc88d50ceb..7210fbdb5e 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -123,7 +123,7 @@ int MAIN(int argc, char **argv)
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);
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 0f3ac4977a..261139565d 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -197,7 +197,7 @@ int MAIN(int argc, char **argv)
} 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")) {
@@ -404,7 +404,7 @@ int MAIN(int argc, char **argv)
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)) {
@@ -436,7 +436,7 @@ int MAIN(int argc, char **argv)
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) {
@@ -527,7 +527,7 @@ int MAIN(int argc, char **argv)
goto export_end;
}
- safes = sk_PKCS7_new (NULL);
+ safes = sk_PKCS7_new_null ();
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);
- bags = sk_PKCS12_SAFEBAG_new(NULL);
+ bags = sk_PKCS12_SAFEBAG_new_null();
sk_PKCS12_SAFEBAG_push (bags, bag);
#ifdef CRYPTO_MDEBUG