summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-07-21 20:57:16 +0000
committerBodo Möller <bodo@openssl.org>1999-07-21 20:57:16 +0000
commit74678cc2f8132ad34f7c33731c4765cf3083de8c (patch)
treeda0cd26e2c32fc9b0bf540be33964282b4a5ed9d /apps
parent664b99853cbefd2dc9f6ee56631f36b0f63d0d06 (diff)
Additional user data argument to pem_password_cb function type
and to lots of PEM_... functions. Submitted by: Damien Miller <dmiller@ilogic.com.au>
Diffstat (limited to 'apps')
-rw-r--r--apps/ca.c12
-rw-r--r--apps/crl.c2
-rw-r--r--apps/crl2p7.c4
-rw-r--r--apps/dh.c2
-rw-r--r--apps/dsa.c4
-rw-r--r--apps/dsaparam.c4
-rw-r--r--apps/gendsa.c4
-rw-r--r--apps/genrsa.c2
-rw-r--r--apps/nseq.c4
-rw-r--r--apps/pkcs12.c8
-rw-r--r--apps/pkcs7.c2
-rw-r--r--apps/pkcs8.c8
-rw-r--r--apps/req.c10
-rw-r--r--apps/rsa.c4
-rw-r--r--apps/s_server.c2
-rw-r--r--apps/sess_id.c2
-rw-r--r--apps/verify.c2
-rw-r--r--apps/x509.c6
18 files changed, 41 insertions, 41 deletions
diff --git a/apps/ca.c b/apps/ca.c
index 6a86438b13..26b86dec4f 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -499,10 +499,10 @@ bad:
goto err;
}
if (key == NULL)
- pkey=PEM_read_bio_PrivateKey(in,NULL,NULL);
+ pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL);
else
{
- pkey=PEM_read_bio_PrivateKey(in,NULL,key_callback);
+ pkey=PEM_read_bio_PrivateKey(in,NULL,key_callback,NULL);
memset(key,0,strlen(key));
}
if (pkey == NULL)
@@ -525,7 +525,7 @@ bad:
BIO_printf(bio_err,"trying to load CA certificate\n");
goto err;
}
- x509=PEM_read_bio_X509(in,NULL,NULL);
+ x509=PEM_read_bio_X509(in,NULL,NULL,NULL);
if (x509 == NULL)
{
BIO_printf(bio_err,"unable to load CA certificate\n");
@@ -1146,7 +1146,7 @@ bad:
BIO_printf(bio_err,"error trying to load '%s' certificate\n",infile);
goto err;
}
- x509=PEM_read_bio_X509(in,NULL,NULL);
+ x509=PEM_read_bio_X509(in,NULL,NULL,NULL);
if (x509 == NULL)
{
BIO_printf(bio_err,"unable to load '%s' certificate\n",infile);
@@ -1340,7 +1340,7 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
perror(infile);
goto err;
}
- if ((req=PEM_read_bio_X509_REQ(in,NULL,NULL)) == NULL)
+ if ((req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL)) == NULL)
{
BIO_printf(bio_err,"Error reading certificate request in %s\n",
infile);
@@ -1400,7 +1400,7 @@ static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
perror(infile);
goto err;
}
- if ((req=PEM_read_bio_X509(in,NULL,NULL)) == NULL)
+ if ((req=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
{
BIO_printf(bio_err,"Error reading self signed certificate in %s\n",infile);
goto err;
diff --git a/apps/crl.c b/apps/crl.c
index 1b04f68ecf..f7bdf76676 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -280,7 +280,7 @@ static X509_CRL *load_crl(char *infile, int format)
if (format == FORMAT_ASN1)
x=d2i_X509_CRL_bio(in,NULL);
else if (format == FORMAT_PEM)
- x=PEM_read_bio_X509_CRL(in,NULL,NULL);
+ x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL);
else {
BIO_printf(bio_err,"bad input format specified for input crl\n");
goto end;
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index f4b216f68b..8634e3a1ec 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -193,7 +193,7 @@ bad:
if (informat == FORMAT_ASN1)
crl=d2i_X509_CRL_bio(in,NULL);
else if (informat == FORMAT_PEM)
- crl=PEM_read_bio_X509_CRL(in,NULL,NULL);
+ crl=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL);
else {
BIO_printf(bio_err,"bad input format specified for input crl\n");
goto end;
@@ -304,7 +304,7 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile)
}
/* This loads from a file, a stack of x509/crl/pkey sets */
- sk=PEM_X509_INFO_read_bio(in,NULL,NULL);
+ sk=PEM_X509_INFO_read_bio(in,NULL,NULL,NULL);
if (sk == NULL) {
BIO_printf(bio_err,"error reading the file, %s\n",certfile);
goto end;
diff --git a/apps/dh.c b/apps/dh.c
index b4abbe7f09..9efdcd78a3 100644
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -194,7 +194,7 @@ bad:
if (informat == FORMAT_ASN1)
dh=d2i_DHparams_bio(in,NULL);
else if (informat == FORMAT_PEM)
- dh=PEM_read_bio_DHparams(in,NULL,NULL);
+ dh=PEM_read_bio_DHparams(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified\n");
diff --git a/apps/dsa.c b/apps/dsa.c
index 977955ae59..fedecf2739 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -191,7 +191,7 @@ bad:
if (informat == FORMAT_ASN1)
dsa=d2i_DSAPrivateKey_bio(in,NULL);
else if (informat == FORMAT_PEM)
- dsa=PEM_read_bio_DSAPrivateKey(in,NULL,NULL);
+ dsa=PEM_read_bio_DSAPrivateKey(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified for key\n");
@@ -235,7 +235,7 @@ bad:
if (outformat == FORMAT_ASN1)
i=i2d_DSAPrivateKey_bio(out,dsa);
else if (outformat == FORMAT_PEM)
- i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL);
+ i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL,NULL);
else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index be653a3465..fb8d471108 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -220,7 +220,7 @@ bad:
else if (informat == FORMAT_ASN1)
dsa=d2i_DSAparams_bio(in,NULL);
else if (informat == FORMAT_PEM)
- dsa=PEM_read_bio_DSAparams(in,NULL,NULL);
+ dsa=PEM_read_bio_DSAparams(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified\n");
@@ -321,7 +321,7 @@ bad:
if (outformat == FORMAT_ASN1)
i=i2d_DSAPrivateKey_bio(out,dsakey);
else if (outformat == FORMAT_PEM)
- i=PEM_write_bio_DSAPrivateKey(out,dsakey,NULL,NULL,0,NULL);
+ i=PEM_write_bio_DSAPrivateKey(out,dsakey,NULL,NULL,0,NULL,NULL);
else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
diff --git a/apps/gendsa.c b/apps/gendsa.c
index bf186739e6..dc0b2165fd 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -155,7 +155,7 @@ bad:
goto end;
}
- if ((dsa=PEM_read_bio_DSAparams(in,NULL,NULL)) == NULL)
+ if ((dsa=PEM_read_bio_DSAparams(in,NULL,NULL,NULL)) == NULL)
{
BIO_printf(bio_err,"unable to load DSA parameter file\n");
goto end;
@@ -197,7 +197,7 @@ bad:
else
RAND_write_file(randfile);
- if (!PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL))
+ if (!PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL,NULL))
goto end;
ret=0;
end:
diff --git a/apps/genrsa.c b/apps/genrsa.c
index cc4f786a99..67382065fb 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -215,7 +215,7 @@ bad:
l+=rsa->e->d[i];
}
BIO_printf(bio_err,"e is %ld (0x%lX)\n",l,l);
- if (!PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0,NULL))
+ if (!PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0,NULL,NULL))
goto err;
ret=0;
diff --git a/apps/nseq.c b/apps/nseq.c
index e7f33af6bf..d9d01659e7 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -124,7 +124,7 @@ int MAIN(int argc, char **argv)
if (toseq) {
seq = NETSCAPE_CERT_SEQUENCE_new();
seq->certs = sk_X509_new(NULL);
- while((x509 = PEM_read_bio_X509(in, NULL, NULL)))
+ while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL)))
sk_X509_push(seq->certs,x509);
if(!sk_X509_num(seq->certs))
@@ -138,7 +138,7 @@ int MAIN(int argc, char **argv)
goto end;
}
- if (!(seq = PEM_read_bio_NETSCAPE_CERT_SEQUENCE(in, NULL, NULL))) {
+ if (!(seq = PEM_read_bio_NETSCAPE_CERT_SEQUENCE(in, NULL, NULL, NULL))) {
BIO_printf (bio_err, "Error reading sequence file %s\n", infile);
ERR_print_errors(bio_err);
goto end;
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 45d979712a..f3f82ddfc9 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -292,7 +292,7 @@ if (export_cert) {
unsigned char keyid[EVP_MAX_MD_SIZE];
unsigned int keyidlen;
/* Get private key so we can match it to a certificate */
- key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL);
+ key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL, NULL);
if (!inkey) (void)BIO_reset(in);
if (!key) {
BIO_printf (bio_err, "Error loading private key\n");
@@ -531,7 +531,7 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
p8 = bag->value.keybag;
if (!(pkey = EVP_PKCS82PKEY (p8))) return 0;
print_attribs (out, p8->attributes, "Key Attributes");
- PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL);
+ PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, NULL);
EVP_PKEY_free(pkey);
break;
@@ -547,7 +547,7 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
if (!(pkey = EVP_PKCS82PKEY (p8))) return 0;
print_attribs (out, p8->attributes, "Key Attributes");
PKCS8_PRIV_KEY_INFO_free(p8);
- PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL);
+ PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, NULL);
EVP_PKEY_free(pkey);
break;
@@ -633,7 +633,7 @@ int cert_load(BIO *in, STACK_OF(X509) *sk)
int ret;
X509 *cert;
ret = 0;
- while((cert = PEM_read_bio_X509(in, NULL, NULL))) {
+ while((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
ret = 1;
sk_X509_push(sk, cert);
}
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index 9518983d5d..0e1427cc31 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -195,7 +195,7 @@ bad:
if (informat == FORMAT_ASN1)
p7=d2i_PKCS7_bio(in,NULL);
else if (informat == FORMAT_PEM)
- p7=PEM_read_bio_PKCS7(in,NULL,NULL);
+ p7=PEM_read_bio_PKCS7(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified for pkcs7 object\n");
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index 9779081734..9e9b92b33e 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -160,7 +160,7 @@ int MAIN(int argc, char **argv)
} else out = BIO_new_fp (stdout, BIO_NOCLOSE);
if (topk8) {
- if (!(pkey = PEM_read_bio_PrivateKey(in, NULL, NULL))) {
+ if (!(pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, NULL))) {
BIO_printf (bio_err, "Error reading key\n", outfile);
ERR_print_errors(bio_err);
return (1);
@@ -209,7 +209,7 @@ int MAIN(int argc, char **argv)
if(nocrypt) {
if(informat == FORMAT_PEM)
- p8inf = PEM_read_bio_PKCS8_PRIV_KEY_INFO(in,NULL,NULL);
+ p8inf = PEM_read_bio_PKCS8_PRIV_KEY_INFO(in,NULL,NULL, NULL);
else if(informat == FORMAT_ASN1)
p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(in, NULL);
else {
@@ -218,7 +218,7 @@ int MAIN(int argc, char **argv)
}
} else {
if(informat == FORMAT_PEM)
- p8 = PEM_read_bio_PKCS8(in, NULL, NULL);
+ p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL);
else if(informat == FORMAT_ASN1)
p8 = d2i_PKCS8_bio(in, NULL);
else {
@@ -263,7 +263,7 @@ int MAIN(int argc, char **argv)
PKCS8_PRIV_KEY_INFO_free(p8inf);
- PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL);
+ PEM_write_bio_PrivateKey(out, pkey, NULL, NULL, 0, NULL, NULL);
EVP_PKEY_free(pkey);
BIO_free(out);
diff --git a/apps/req.c b/apps/req.c
index 86c29e0863..463ac156ea 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -242,11 +242,11 @@ int MAIN(int argc, char **argv)
perror(p);
goto end;
}
- if ((dsa_params=PEM_read_bio_DSAparams(in,NULL,NULL)) == NULL)
+ if ((dsa_params=PEM_read_bio_DSAparams(in,NULL,NULL,NULL)) == NULL)
{
ERR_clear_error();
(void)BIO_reset(in);
- if ((xtmp=PEM_read_bio_X509(in,NULL,NULL)) == NULL)
+ if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)
{
BIO_printf(bio_err,"unable to load DSA parameters from file\n");
goto end;
@@ -455,7 +455,7 @@ bad:
rsa=d2i_RSAPrivateKey_bio(in,NULL);
else */
if (keyform == FORMAT_PEM)
- pkey=PEM_read_bio_PrivateKey(in,NULL,NULL);
+ pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified for X509 request\n");
@@ -560,7 +560,7 @@ bad:
i=0;
loop:
if (!PEM_write_bio_PrivateKey(out,pkey,cipher,
- NULL,0,NULL))
+ NULL,0,NULL,NULL))
{
if ((ERR_GET_REASON(ERR_peek_error()) ==
PEM_R_PROBLEMS_GETTING_PASSWORD) && (i < 3))
@@ -594,7 +594,7 @@ loop:
if (informat == FORMAT_ASN1)
req=d2i_X509_REQ_bio(in,NULL);
else if (informat == FORMAT_PEM)
- req=PEM_read_bio_X509_REQ(in,NULL,NULL);
+ req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified for X509 request\n");
diff --git a/apps/rsa.c b/apps/rsa.c
index 07c14e2edd..9b723ee406 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -222,7 +222,7 @@ bad:
}
#endif
else if (informat == FORMAT_PEM)
- rsa=PEM_read_bio_RSAPrivateKey(in,NULL,NULL);
+ rsa=PEM_read_bio_RSAPrivateKey(in,NULL,NULL,NULL);
else
{
BIO_printf(bio_err,"bad input format specified for key\n");
@@ -312,7 +312,7 @@ bad:
}
#endif
else if (outformat == FORMAT_PEM)
- i=PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0,NULL);
+ i=PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL,0,NULL,NULL);
else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
diff --git a/apps/s_server.c b/apps/s_server.c
index 4b932baac2..5b079182e0 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1027,7 +1027,7 @@ static DH *load_dh_param(void)
if ((bio=BIO_new_file(DH_PARAM,"r")) == NULL)
goto err;
- ret=PEM_read_bio_DHparams(bio,NULL,NULL);
+ ret=PEM_read_bio_DHparams(bio,NULL,NULL,NULL);
err:
if (bio != NULL) BIO_free(bio);
return(ret);
diff --git a/apps/sess_id.c b/apps/sess_id.c
index eb84e2528d..8ac118d4a1 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -289,7 +289,7 @@ static SSL_SESSION *load_sess_id(char *infile, int format)
if (format == FORMAT_ASN1)
x=d2i_SSL_SESSION_bio(in,NULL);
else if (format == FORMAT_PEM)
- x=PEM_read_bio_SSL_SESSION(in,NULL,NULL);
+ x=PEM_read_bio_SSL_SESSION(in,NULL,NULL,NULL);
else {
BIO_printf(bio_err,"bad input format specified for input crl\n");
goto end;
diff --git a/apps/verify.c b/apps/verify.c
index 119709f5b4..093fe09f2c 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -171,7 +171,7 @@ static int check(X509_STORE *ctx, char *file)
}
}
- x=PEM_read_bio_X509(in,NULL,NULL);
+ x=PEM_read_bio_X509(in,NULL,NULL,NULL);
if (x == NULL)
{
fprintf(stdout,"%s: unable to load certificate file\n",
diff --git a/apps/x509.c b/apps/x509.c
index 1024c0d3f7..2e2d18bea4 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -377,7 +377,7 @@ bad:
goto end;
}
}
- req=PEM_read_bio_X509_REQ(in,NULL,NULL);
+ req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL);
BIO_free(in);
if (req == NULL) { perror(infile); goto end; }
@@ -948,7 +948,7 @@ static EVP_PKEY *load_key(char *file, int format)
#endif
if (format == FORMAT_PEM)
{
- pkey=PEM_read_bio_PrivateKey(key,NULL,NULL);
+ pkey=PEM_read_bio_PrivateKey(key,NULL,NULL,NULL);
}
else
{
@@ -1031,7 +1031,7 @@ static X509 *load_cert(char *file, int format)
ah->data=NULL;
}
else if (format == FORMAT_PEM)
- x=PEM_read_bio_X509(cert,NULL,NULL);
+ x=PEM_read_bio_X509(cert,NULL,NULL,NULL);
else {
BIO_printf(bio_err,"bad input format specified for input cert\n");
goto end;