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/ec.c | |
parent | d0190e11639956677747f6bc7bb5bcd610fd8600 (diff) | |
download | openssl-new-03bbd346f4410c329d472cc043fb6c49f6688eba.tar.gz |
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/ec.c')
-rw-r--r-- | apps/ec.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -70,7 +70,7 @@ int ec_main(int argc, char **argv) BIO *in = NULL, *out = NULL; ENGINE *e = NULL; const EVP_CIPHER *enc = NULL; - char *infile = NULL, *outfile = NULL, *prog; + char *infile = NULL, *outfile = NULL, *ciphername = NULL, *prog; char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = NULL; OPTION_CHOICE o; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0; @@ -131,8 +131,7 @@ int ec_main(int argc, char **argv) e = setup_engine(opt_arg(), 0); break; case OPT_CIPHER: - if (!opt_cipher(opt_unknown(), &enc)) - goto opthelp; + ciphername = opt_unknown(); break; case OPT_CONV_FORM: point_format = opt_arg(); @@ -162,6 +161,10 @@ int ec_main(int argc, char **argv) if (argc != 0) goto opthelp; + if (ciphername != NULL) { + if (!opt_cipher(ciphername, &enc)) + goto opthelp; + } private = param_out || pubin || pubout ? 0 : 1; if (text && !pubin) private = 1; |