From ea57e823959441c694673a82a628e4874bbb144e Mon Sep 17 00:00:00 2001 From: jordan Date: Wed, 11 Sep 2024 08:20:15 -0500 Subject: [PATCH] Update HAVE_FIPS define guard in test.h. --- wolfssl/test.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfssl/test.h b/wolfssl/test.h index 0fb23c1962..8c2d6b4ecc 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -3342,8 +3342,9 @@ static WC_INLINE int myEccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey, ret = BAD_FUNC_ARG; } -#if defined(ECC_TIMING_RESISTANT) && !defined(HAVE_FIPS) && \ - !defined(HAVE_SELFTEST) +#if defined(ECC_TIMING_RESISTANT) && (!defined(HAVE_FIPS) || \ + (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION != 2))) && \ + !defined(HAVE_SELFTEST) if (ret == 0) { ret = wc_ecc_set_rng(privKey, wolfSSL_GetRNG(ssl)); }