diff options
author | Richard Levitte <levitte@openssl.org> | 2001-05-30 15:29:28 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-05-30 15:29:28 +0000 |
commit | 30b4c2724ea2a078d921ba16a51b8d3e2ad85c42 (patch) | |
tree | 551cb4a7545944a838e3a1f571dabce14bea1a24 /apps/x509.c | |
parent | 2adc929367129a845ae2aa8358e645d4dbb9c624 (diff) | |
download | openssl-30b4c2724ea2a078d921ba16a51b8d3e2ad85c42.tar.gz |
Extend all the loading functions to take an engine pointer, a pass
string (some engines may have certificates protected by a PIN!) and
a description to put into error messages.
Also, have our own password callback that we can send both a password
and some prompt info to. The default password callback in EVP assumes
that the passed parameter is a password, which isn't always the right
thing, and the ENGINE code (at least the nCipher one) makes other
assumptions...
Also, in spite of having the functions to load keys, some utilities
did the loading all by themselves... That's changed too.
Diffstat (limited to 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/x509.c b/apps/x509.c index 391bb3eef9..5be90740c6 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -619,12 +619,12 @@ bad: EVP_PKEY_free(pkey); } else - x=load_cert(bio_err,infile,informat); + x=load_cert(bio_err,infile,informat,NULL,e,"Certificate"); if (x == NULL) goto end; if (CA_flag) { - xca=load_cert(bio_err,CAfile,CAformat); + xca=load_cert(bio_err,CAfile,CAformat,NULL,e,"CA Certificate"); if (xca == NULL) goto end; } @@ -874,7 +874,8 @@ bad: if (Upkey == NULL) { Upkey=load_key(bio_err, - keyfile,keyformat, passin, e); + keyfile,keyformat, passin, e, + "Private key"); if (Upkey == NULL) goto end; } #ifndef OPENSSL_NO_DSA @@ -893,7 +894,7 @@ bad: { CApkey=load_key(bio_err, CAkeyfile,CAkeyformat, passin, - e); + e, "CA Private Key"); if (CApkey == NULL) goto end; } #ifndef OPENSSL_NO_DSA @@ -920,7 +921,8 @@ bad: else { pk=load_key(bio_err, - keyfile,FORMAT_PEM, passin, e); + keyfile,FORMAT_PEM, passin, e, + "request key"); if (pk == NULL) goto end; } |