diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-12-25 00:53:57 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-12-25 00:53:57 +0100 |
commit | 36217a942488852b616974e168a6ff0fecfb02fa (patch) | |
tree | 416a573e7d641b0209f7479c93070cc5365de039 /apps/rsa.c | |
parent | Fixes so NO_RSA works again. (diff) | |
download | openssl-36217a942488852b616974e168a6ff0fecfb02fa.tar.xz openssl-36217a942488852b616974e168a6ff0fecfb02fa.zip |
Allow passwords to be included on command line for a few
more utilities.
Diffstat (limited to 'apps/rsa.c')
-rw-r--r-- | apps/rsa.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/rsa.c b/apps/rsa.c index 219bdd65d6..684252cc1d 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -278,11 +278,7 @@ bad: #endif else if (informat == FORMAT_PEM) { if(pubin) rsa=PEM_read_bio_RSA_PUBKEY(in,NULL,NULL,NULL); - else { - if(passin) rsa=PEM_read_bio_RSAPrivateKey(in,NULL, - key_cb,passin); - else rsa=PEM_read_bio_RSAPrivateKey(in,NULL,NULL,NULL); - } + else rsa=PEM_read_bio_RSAPrivateKey(in,NULL, PEM_cb,passin); } else { @@ -381,12 +377,8 @@ bad: else if (outformat == FORMAT_PEM) { if(pubout || pubin) i=PEM_write_bio_RSA_PUBKEY(out,rsa); - else { - if(passout) i=PEM_write_bio_RSAPrivateKey(out,rsa, - enc,NULL,0,key_cb,passout); - else i=PEM_write_bio_RSAPrivateKey(out,rsa,enc,NULL, - 0,NULL,NULL); - } + else i=PEM_write_bio_RSAPrivateKey(out,rsa, + enc,NULL,0,PEM_cb,passout); } else { BIO_printf(bio_err,"bad output format specified for outfile\n"); goto end; |