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:58:16 +0100
commitf2f2ac88499ad58546f9c5b19ebc0b6eddf0b49f (patch)
tree01f3735611efa5cc53a084a91da2c81fb5a59499 /apps
parent4ed2db591a42fb99401f9b0ff17f6644797ae743 (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) (cherry picked from commit 7ee0954a086ee3b4e0a8c6736600e3d6362485c0)
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 119419c5ef..d0f127d3ea 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;