summaryrefslogtreecommitdiffstats
path: root/apps/rsa.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-12-24 23:53:57 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-12-24 23:53:57 +0000
commit36217a942488852b616974e168a6ff0fecfb02fa (patch)
tree416a573e7d641b0209f7479c93070cc5365de039 /apps/rsa.c
parent12aefe78f0aec57159e396b5fd8f71644a76b631 (diff)
Allow passwords to be included on command line for a few
more utilities.
Diffstat (limited to 'apps/rsa.c')
-rw-r--r--apps/rsa.c14
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;