From: Dr. David von Oheimb Date: Sat, 17 Sep 2022 18:58:16 +0000 (+0200) Subject: CMP: fix gen_new() in cmp_msg.c checking wrong ITAVs X-Git-Tag: openssl-3.2.0-alpha1~1667 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e3034939b40ee15013bdba9ff6178de6bcc26d4;p=thirdparty%2Fopenssl.git 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) --- 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))