From 506a8649e9478e6a75e46a4127964d954df2f2cc Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 18 Jun 2026 00:26:22 -0600 Subject: [PATCH] add macro guard around new test case for specific builds --- tests/api/test_ecc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/api/test_ecc.c b/tests/api/test_ecc.c index c6f7cb9ece..7ac7d1fb7e 100644 --- a/tests/api/test_ecc.c +++ b/tests/api/test_ecc.c @@ -579,7 +579,10 @@ int test_wc_ecc_shared_secret(void) } /* END tests_wc_ecc_shared_secret */ #if defined(HAVE_ECC) && defined(HAVE_ECC_DHE) && !defined(WC_NO_RNG) && \ - (defined(HAVE_ECC384) || defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)) + (defined(HAVE_ECC384) || defined(HAVE_ECC521) || \ + defined(HAVE_ALL_CURVES)) && \ + (!defined(WOLFSSL_SP_521) || \ + ((!defined(HAVE_FIPS) || FIPS_VERSION_GT(7,0)) && !defined(HAVE_SELFTEST))) /* Verify the output-buffer size contract of wc_ecc_shared_secret() at the * field-size boundary. The single-precision (SP) math secret generators for * P-384/P-521 historically validated the caller's buffer against the wrong @@ -655,7 +658,10 @@ int test_wc_ecc_shared_secret_size_bounds(void) { EXPECT_DECLS; #if defined(HAVE_ECC) && defined(HAVE_ECC_DHE) && !defined(WC_NO_RNG) && \ - (defined(HAVE_ECC384) || defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)) + (defined(HAVE_ECC384) || defined(HAVE_ECC521) || \ + defined(HAVE_ALL_CURVES)) && \ + (!defined(WOLFSSL_SP_521) || \ + ((!defined(HAVE_FIPS) || FIPS_VERSION_GT(7,0)) && !defined(HAVE_SELFTEST))) WC_RNG rng; int rngInit = 0;