]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/cmp.c: avoid misleading error on genm with -reqout_only
authorDr. David von Oheimb <dev@ddvo.net>
Fri, 30 May 2025 09:10:13 +0000 (11:10 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 3 Feb 2026 08:42:11 +0000 (09:42 +0100)
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)

apps/cmp.c

index 427ff0e5192765663ea58e1f370a00c37eb5ea69..6229de6c5ed7a3fc215dd71311b2eaf4f745827e 100644 (file)
@@ -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);