summaryrefslogtreecommitdiffstats
path: root/crypto/cmp/cmp_msg.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-09-17 20:58:16 +0200
committerDr. David von Oheimb <dev@ddvo.net>2022-11-25 09:29:17 +0100
commitf494a5c2fe7e1b0ea11c6785f4357c240b395cf7 (patch)
tree4b1697c705317a57ff0a8f23b3cb77169fefce6d /crypto/cmp/cmp_msg.c
parent9bf67ed5525aaeebbed96d3c8a4caa93eb1b43ac (diff)
CMP: fix gen_new() in cmp_msg.c checking wrong ITAVs
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/19216) (cherry picked from commit 7e3034939b40ee15013bdba9ff6178de6bcc26d4)
Diffstat (limited to 'crypto/cmp/cmp_msg.c')
-rw-r--r--crypto/cmp/cmp_msg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/cmp/cmp_msg.c b/crypto/cmp/cmp_msg.c
index 5526f99eca..b244f1e17f 100644
--- a/crypto/cmp/cmp_msg.c
+++ b/crypto/cmp/cmp_msg.c
@@ -700,8 +700,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))