From 7e3034939b40ee15013bdba9ff6178de6bcc26d4 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Sat, 17 Sep 2022 20:58:16 +0200 Subject: [PATCH] CMP: fix gen_new() in cmp_msg.c checking wrong ITAVs Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/19216) --- crypto/cmp/cmp_msg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/cmp/cmp_msg.c b/crypto/cmp/cmp_msg.c index 6a6f30c1a1e..619cf7b78bf 100644 --- a/crypto/cmp/cmp_msg.c +++ b/crypto/cmp/cmp_msg.c @@ -699,8 +699,7 @@ static OSSL_CMP_MSG *gen_new(OSSL_CMP_CTX *ctx, if ((msg = ossl_cmp_msg_create(ctx, body_type)) == NULL) return NULL; - if (ctx->genm_ITAVs != NULL - && !ossl_cmp_msg_gen_push1_ITAVs(msg, itavs)) + if (itavs != NULL && !ossl_cmp_msg_gen_push1_ITAVs(msg, itavs)) goto err; if (!ossl_cmp_msg_protect(ctx, msg)) -- 2.47.3