From 2464d8dc1907b832222ec19d1d0500d9306c47d5 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Sat, 10 Jun 2023 15:20:07 +0200 Subject: [PATCH] cmp_vfy.c/check_msg_all_certs(): remove needless trace output in case 3GPP mode is not enabled Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/19948) --- crypto/cmp/cmp_vfy.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crypto/cmp/cmp_vfy.c b/crypto/cmp/cmp_vfy.c index 5c5cd456dd2..cfbd3d83003 100644 --- a/crypto/cmp/cmp_vfy.c +++ b/crypto/cmp/cmp_vfy.c @@ -424,14 +424,14 @@ static int check_msg_all_certs(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg, { int ret = 0; - if (mode_3gpp - && ((!ctx->permitTAInExtraCertsForIR - || OSSL_CMP_MSG_get_bodytype(msg) != OSSL_CMP_PKIBODY_IP))) + if (ctx->permitTAInExtraCertsForIR + && OSSL_CMP_MSG_get_bodytype(msg) == OSSL_CMP_PKIBODY_IP) + ossl_cmp_info(ctx, mode_3gpp ? + "normal mode failed; trying now 3GPP mode trusting extraCerts" + : "trying first normal mode using trust store"); + else if (mode_3gpp) return 0; - ossl_cmp_info(ctx, - mode_3gpp ? "normal mode failed; trying now 3GPP mode trusting extraCerts" - : "trying first normal mode using trust store"); if (check_msg_with_certs(ctx, msg->extraCerts, "extraCerts", NULL, NULL, msg, mode_3gpp)) return 1; -- 2.47.2