summaryrefslogtreecommitdiffstats
path: root/apps/dsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dsa.c')
-rw-r--r--apps/dsa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/dsa.c b/apps/dsa.c
index ebb841fa53..c4baaf7de9 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -87,7 +87,7 @@ int dsa_main(int argc, char **argv)
int modulus = 0, pubin = 0, pubout = 0, ret = 1;
int pvk_encr = DEFAULT_PVK_ENCR_STRENGTH;
int private = 0;
- const char *output_type = NULL;
+ const char *output_type = NULL, *ciphername = NULL;
const char *output_structure = NULL;
int selection = 0;
OSSL_ENCODER_CTX *ectx = NULL;
@@ -151,8 +151,7 @@ int dsa_main(int argc, char **argv)
pubout = 1;
break;
case OPT_CIPHER:
- if (!opt_cipher(opt_unknown(), &enc))
- goto end;
+ ciphername = opt_unknown();
break;
case OPT_PROV_CASES:
if (!opt_provider(o))
@@ -166,6 +165,10 @@ int dsa_main(int argc, char **argv)
if (argc != 0)
goto opthelp;
+ if (ciphername != NULL) {
+ if (!opt_cipher(ciphername, &enc))
+ goto end;
+ }
private = pubin || pubout ? 0 : 1;
if (text && !pubin)
private = 1;