Better macro gating

This commit is contained in:
Anthony Hu
2026-03-31 12:48:12 -04:00
parent 30b196471b
commit 7be3d1f18d
4 changed files with 8 additions and 0 deletions
+2
View File
@@ -176,6 +176,7 @@ int test_wc_ed25519_sign_msg(void)
int test_wc_ed25519_sign_msg_pubonly_fails(void)
{
EXPECT_DECLS;
#if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(7,0,0)
#if defined(HAVE_ED25519) && defined(HAVE_ED25519_SIGN) && \
defined(HAVE_ED25519_KEY_IMPORT) && defined(HAVE_ED25519_KEY_EXPORT)
ed25519_key fullKey;
@@ -209,6 +210,7 @@ int test_wc_ed25519_sign_msg_pubonly_fails(void)
DoExpectIntEQ(wc_FreeRng(&rng), 0);
wc_ed25519_free(&pubOnlyKey);
wc_ed25519_free(&fullKey);
#endif
#endif
return EXPECT_RESULT();
} /* END test_wc_ed25519_sign_msg_pubonly_fails */
+2
View File
@@ -169,6 +169,7 @@ int test_wc_ed448_sign_msg(void)
int test_wc_ed448_sign_msg_pubonly_fails(void)
{
EXPECT_DECLS;
#if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(7,0,0)
#if defined(HAVE_ED448) && defined(HAVE_ED448_SIGN) && \
defined(HAVE_ED448_KEY_IMPORT) && defined(HAVE_ED448_KEY_EXPORT)
ed448_key fullKey;
@@ -202,6 +203,7 @@ int test_wc_ed448_sign_msg_pubonly_fails(void)
DoExpectIntEQ(wc_FreeRng(&rng), 0);
wc_ed448_free(&pubOnlyKey);
wc_ed448_free(&fullKey);
#endif
#endif
return EXPECT_RESULT();
} /* END test_wc_ed448_sign_msg_pubonly_fails */
+2
View File
@@ -692,6 +692,7 @@ int test_wc_dilithium(void)
int test_wc_dilithium_sign_pubonly_fails(void)
{
EXPECT_DECLS;
#if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(7,0,0)
#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \
!defined(WOLFSSL_DILITHIUM_NO_SIGN) && \
!defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) && \
@@ -757,6 +758,7 @@ int test_wc_dilithium_sign_pubonly_fails(void)
XFREE(pubBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(pubOnlyKey, NULL, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif
#endif
return EXPECT_RESULT();
} /* END test_wc_dilithium_sign_pubonly_fails */
+2
View File
@@ -3880,6 +3880,7 @@ int test_wc_mlkem_decapsulate_kats(void)
int test_wc_mlkem_decapsulate_pubonly_fails(void)
{
EXPECT_DECLS;
#if !defined(HAVE_FIPS) || FIPS_VERSION3_GE(7,0,0)
#if defined(WOLFSSL_HAVE_MLKEM) && defined(WOLFSSL_WC_MLKEM) && \
!defined(WOLFSSL_NO_ML_KEM) && !defined(WOLFSSL_MLKEM_NO_DECAPSULATE) && \
!defined(WOLFSSL_MLKEM_NO_ENCAPSULATE) && \
@@ -3944,6 +3945,7 @@ int test_wc_mlkem_decapsulate_pubonly_fails(void)
wc_MlKemKey_Free(fullKey);
XFREE(pubOnlyKey, NULL, DYNAMIC_TYPE_TMP_BUFFER);
XFREE(fullKey, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif
#endif
return EXPECT_RESULT();
} /* END test_wc_mlkem_decapsulate_pubonly_fails */