Commit 62324627 authored by Richard Levitte's avatar Richard Levitte
Browse files

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.
parent 623eea37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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++) {
+1 −1
Original line number Diff line number Diff line
@@ -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);

+5 −5
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
	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);

Loading