summaryrefslogtreecommitdiffstats
path: root/apps/dsa.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/dsa.c
parent12aefe78f0aec57159e396b5fd8f71644a76b631 (diff)
Allow passwords to be included on command line for a few
more utilities.
Diffstat (limited to 'apps/dsa.c')
-rw-r--r--apps/dsa.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/dsa.c b/apps/dsa.c
index a5ff647252..94f71b5be8 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -236,11 +236,7 @@ bad:
else dsa=d2i_DSAPrivateKey_bio(in,NULL);
} else if (informat == FORMAT_PEM) {
if(pubin) dsa=PEM_read_bio_DSA_PUBKEY(in,NULL, NULL, NULL);
- else {
- if(passin) dsa=PEM_read_bio_DSAPrivateKey(in,NULL,
- key_cb,passin);
- else dsa=PEM_read_bio_DSAPrivateKey(in,NULL,NULL,NULL);
- }
+ else dsa=PEM_read_bio_DSAPrivateKey(in,NULL,PEM_cb,passin);
} else
{
BIO_printf(bio_err,"bad input format specified for key\n");
@@ -287,12 +283,8 @@ bad:
} else if (outformat == FORMAT_PEM) {
if(pubin || pubout)
i=PEM_write_bio_DSA_PUBKEY(out,dsa);
- else {
- if(passout) i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,
- NULL,0,key_cb, passout);
- i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,
- NULL,NULL);
- }
+ else i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,
+ NULL,0,PEM_cb, passout);
} else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;