From: Dr. David von Oheimb Date: Sat, 10 Jun 2023 13:20:07 +0000 (+0200) Subject: cmp_vfy.c/check_msg_all_certs(): remove needless trace output in case 3GPP mode is... X-Git-Tag: openssl-3.3.0-alpha1~291 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2464d8dc1907b832222ec19d1d0500d9306c47d5;p=thirdparty%2Fopenssl.git 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) --- 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;