From 791508220f8a4d9d990295c3a57362306fc6e7a0 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 29 Jul 2022 09:33:14 -0500 Subject: [PATCH] wolfssl/internal.h: fix spurious assert failure on jumbo RSA key configurations (> 8192 bits); mollify bugprone-macro-parentheses. --- wolfssl/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfssl/internal.h b/wolfssl/internal.h index b526dc074..0b1e9ef20 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -1164,7 +1164,7 @@ enum { #define WOLFSSL_MAX_RSA_BITS (FP_MAX_BITS / 2) #elif defined(WOLFSSL_SP_MATH_ALL) || defined(WOLFSSL_SP_MATH) /* SP implementation supports numbers of SP_INT_BITS bits. */ - #define WOLFSSL_MAX_RSA_BITS ((SP_INT_BITS + 7) / 8) * 8 + #define WOLFSSL_MAX_RSA_BITS (((SP_INT_BITS + 7) / 8) * 8) #else /* Integer maths is dynamic but we only go up to 4096 bits. */ #define WOLFSSL_MAX_RSA_BITS 4096 @@ -1227,7 +1227,7 @@ enum { #error "MySQL needs SP_INT_BITS at least at 8192" #endif - #if WOLFSSL_MAX_RSA_BITS > ENCRYPT_BASE_BITS + #if WOLFSSL_MAX_RSA_BITS > SP_INT_BITS #error "SP_INT_BITS too small for WOLFSSL_MAX_RSA_BITS" #endif #else