From: Dr. David von Oheimb Date: Fri, 30 May 2025 09:10:13 +0000 (+0200) Subject: apps/cmp.c: avoid misleading error on genm with -reqout_only X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a984275f16af59d34f2b684a94cdb3484da628bb;p=thirdparty%2Fopenssl.git apps/cmp.c: avoid misleading error on genm with -reqout_only Reviewed-by: Dmitry Belyavskiy Reviewed-by: Paul Dale 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 427ff0e5192..6229de6c5ed 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);