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/ocsp.c | |
parent | 51e5df0ed01efa47335940425cc8744ecff1b6ae (diff) |
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/ocsp.c')
-rw-r--r-- | apps/ocsp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c index 982423d1ef..dd1677b1c1 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -223,7 +223,7 @@ int ocsp_main(int argc, char **argv) X509_STORE *store = NULL; X509_VERIFY_PARAM *vpm = NULL; const char *CAfile = NULL, *CApath = NULL, *CAstore = NULL; - char *header, *value; + char *header, *value, *respdigname = NULL; char *host = NULL, *port = NULL, *path = "/", *outfile = NULL; char *rca_filename = NULL, *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL, *ridx_filename = NULL; @@ -467,8 +467,7 @@ int ocsp_main(int argc, char **argv) rcertfile = opt_arg(); break; case OPT_RMD: /* Response MessageDigest */ - if (!opt_md(opt_arg(), &rsign_md)) - goto end; + respdigname = opt_arg(); break; case OPT_RSIGOPT: if (rsign_sigopts == NULL) @@ -526,6 +525,11 @@ int ocsp_main(int argc, char **argv) goto opthelp; } + if (respdigname != NULL) { + if (!opt_md(respdigname, &rsign_md)) + goto end; + } + /* Have we anything to do? */ if (req == NULL && reqin == NULL && respin == NULL && !(port != NULL && ridx_filename != NULL)) |