summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-12-07 11:35:42 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-12-09 07:57:39 +0100
commit7ee0954a086ee3b4e0a8c6736600e3d6362485c0 (patch)
tree9807ab04addaed50fb1c26fd2a21e78871fb826b /apps
parentd580c2790f9f304533a3eda2a9cf6b8eb22830c3 (diff)
APPS/cmp: fix -rspin option such that it works again without -reqin
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17222)
Diffstat (limited to 'apps')
-rw-r--r--apps/cmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cmp.c b/apps/cmp.c
index 5056d841d1..3082d7d8f6 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -753,6 +753,7 @@ static OSSL_CMP_MSG *read_write_req_resp(OSSL_CMP_CTX *ctx,
OSSL_CMP_MSG *req_new = NULL;
OSSL_CMP_MSG *res = NULL;
OSSL_CMP_PKIHEADER *hdr;
+ const char *prev_opt_rspin = opt_rspin;
if (req != NULL && opt_reqout != NULL
&& !write_PKIMESSAGE(req, &opt_reqout))
@@ -782,7 +783,7 @@ static OSSL_CMP_MSG *read_write_req_resp(OSSL_CMP_CTX *ctx,
if (res == NULL)
goto err;
- if (opt_reqin != NULL || opt_rspin != NULL) {
+ if (opt_reqin != NULL || prev_opt_rspin != NULL) {
/* need to satisfy nonce and transactionID checks */
ASN1_OCTET_STRING *nonce;
ASN1_OCTET_STRING *tid;