diff options
author | Rich Salz <rsalz@akamai.com> | 2021-02-08 14:03:35 -0500 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-02-12 08:34:17 +1000 |
commit | d0190e11639956677747f6bc7bb5bcd610fd8600 (patch) | |
tree | 65b3b8fa880bd32563f4e59bc82624489673da6d /apps/crl.c | |
parent | 51e5df0ed01efa47335940425cc8744ecff1b6ae (diff) | |
download | openssl-d0190e11639956677747f6bc7bb5bcd610fd8600.tar.gz |
Process digest option 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/crl.c')
-rw-r--r-- | apps/crl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/crl.c b/apps/crl.c index ddbf96bfca..34551cc3a4 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -84,6 +84,7 @@ int crl_main(int argc, char **argv) EVP_PKEY *pkey; const EVP_MD *digest = EVP_sha1(); char *infile = NULL, *outfile = NULL, *crldiff = NULL, *keyfile = NULL; + char *digestname = NULL; const char *CAfile = NULL, *CApath = NULL, *CAstore = NULL, *prog; OPTION_CHOICE o; int hash = 0, issuer = 0, lastupdate = 0, nextupdate = 0, noout = 0; @@ -192,8 +193,7 @@ int crl_main(int argc, char **argv) goto opthelp; break; case OPT_MD: - if (!opt_md(opt_unknown(), &digest)) - goto opthelp; + digestname = opt_unknown(); break; case OPT_PROV_CASES: if (!opt_provider(o)) @@ -207,6 +207,8 @@ int crl_main(int argc, char **argv) if (argc != 0) goto opthelp; + if (digestname != NULL && !opt_md(digestname, &digest)) + goto opthelp; x = load_crl(infile, "CRL"); if (x == NULL) goto end; |