From 30b20732288857cf9e3e3efa6de3db76b097fdcc Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 27 Jan 2022 19:54:07 -0600 Subject: [PATCH] test.c: fix gating on wc_ecc_encrypt_ex() for FIPS <5.3 --enable-all. --- wolfcrypt/test/test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 160fb26be..463aecf6b 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -24642,7 +24642,8 @@ WOLFSSL_TEST_SUBROUTINE int ecc_encrypt_test(void) ret = -10412; goto done; } -#ifdef HAVE_COMP_KEY +#if defined(HAVE_COMP_KEY) && \ + (! defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))) /* Create new client and server contexts. */ wc_ecc_ctx_free(srvCtx); wc_ecc_ctx_free(cliCtx); @@ -24700,7 +24701,7 @@ WOLFSSL_TEST_SUBROUTINE int ecc_encrypt_test(void) if (XMEMCMP(plain, msg, sizeof(msg)) != 0) { ret = -10419; goto done; } -#endif /* HAVE_COMP_KEY */ +#endif /* HAVE_COMP_KEY && (!FIPS || FIPS>=5.3) */ #if (!defined(NO_ECC256) || defined(HAVE_ALL_CURVES)) && ECC_MIN_KEY_SZ <= 256 ret = ecc_encrypt_kat(&rng);