Commit a984275f16 for openssl.org
commit a984275f16af59d34f2b684a94cdb3484da628bb
Author: Dr. David von Oheimb <dev@ddvo.net>
Date: Fri May 30 11:10:13 2025 +0200
apps/cmp.c: avoid misleading error on genm with -reqout_only
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb 3 08:43:00 2026
(Merged from https://github.com/openssl/openssl/pull/28478)
diff --git a/apps/cmp.c b/apps/cmp.c
index 427ff0e519..6229de6c5e 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -3605,7 +3605,10 @@ static int do_genm(OSSL_CMP_CTX *ctx)
}
}
- if ((itavs = OSSL_CMP_exec_GENM_ses(ctx)) != NULL) {
+ itavs = OSSL_CMP_exec_GENM_ses(ctx);
+ if (reqout_only_done && OSSL_CMP_CTX_get_status(ctx) == OSSL_CMP_PKISTATUS_trans)
+ return 1; /* not checking response as we did not send request */
+ if (itavs != NULL) {
int res = print_itavs(itavs);
sk_OSSL_CMP_ITAV_pop_free(itavs, OSSL_CMP_ITAV_free);