diff options
author | Rich Salz <rsalz@akamai.com> | 2021-02-08 14:20:01 -0500 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-02-12 08:34:17 +1000 |
commit | 03bbd346f4410c329d472cc043fb6c49f6688eba (patch) | |
tree | 4404d27a430f7a3c8a33ddd6d0633fb35d9a4065 /apps/dsa.c | |
parent | d0190e11639956677747f6bc7bb5bcd610fd8600 (diff) |
Fetch cipher after loading providers
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14135)
Diffstat (limited to 'apps/dsa.c')
-rw-r--r-- | apps/dsa.c | 9 |
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; |