From 09de113145599274041303ff87d9effc51b1bc36 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 24 Jul 2025 16:13:00 +0200 Subject: [PATCH] Fix warning with WOLFSSL_RSA_VERIFY_ONLY PR #8830 introduces a warning when WOLFSSL_NO_CT_OPS is selected. However, in WOLFSSL_RSA_VERIFY_ONLY mode this is enforced in wolfssl/wolfcrypt/settings.h:4035, forcing this warning to appear when this configuration is used. This PR takes into account the special case, allowing WOLFSSL_NO_CT_OPS when WOLFSSL_RSA_VERIFY_ONLY, and removing the warning. --- wolfcrypt/src/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c index e681d2bbd..066134a22 100644 --- a/wolfcrypt/src/misc.c +++ b/wolfcrypt/src/misc.c @@ -634,7 +634,8 @@ WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b, #endif -#if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)) +#if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)) \ + && (!defined(WOLFSSL_RSA_VERIFY_ONLY)) /* constant time operations with mask are required for RSA and TLS operations */ #warning constant time operations required unless using NO_RSA & WOLFCRYPT_ONLY #endif