From 2bf711341b2e1411a74d890e2a8492ec90d5904c Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 26 Aug 2021 13:21:14 -0500 Subject: [PATCH] wolfcrypt/test/test.c: use HAVE_FIPS_VERSION, not FIPS_VERSION. --- wolfcrypt/test/test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 5c9f3c02e..f50bcbb7f 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -921,7 +921,8 @@ initDefaultName(); #endif #ifndef NO_HMAC - #if !defined(NO_MD5) && !(defined(HAVE_FIPS) && defined(FIPS_VERSION) && (FIPS_VERSION >= 5)) + #if !defined(NO_MD5) && !(defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) \ + && (HAVE_FIPS_VERSION >= 5)) if ( (ret = hmac_md5_test()) != 0) return err_sys("HMAC-MD5 test failed!\n", ret); else @@ -3856,7 +3857,9 @@ WOLFSSL_TEST_SUBROUTINE int hash_test(void) } #endif /* !NO_HASH_WRAPPER */ -#if !defined(NO_HMAC) && !defined(NO_MD5) && !(defined(HAVE_FIPS) && defined(FIPS_VERSION) && (FIPS_VERSION >= 5)) +#if !defined(NO_HMAC) && !defined(NO_MD5) && !(defined(HAVE_FIPS) && \ + defined(HAVE_FIPS_VERSION) && \ + (HAVE_FIPS_VERSION >= 5)) WOLFSSL_TEST_SUBROUTINE int hmac_md5_test(void) { Hmac hmac; @@ -3936,7 +3939,7 @@ WOLFSSL_TEST_SUBROUTINE int hmac_md5_test(void) return 0; } -#endif /* !NO_HMAC && !NO_MD5 && !HAVE_FIPS */ +#endif /* !NO_HMAC && !NO_MD5 && (!HAVE_FIPS || (HAVE_FIPS_VERSION < 5)) */ #if !defined(NO_HMAC) && !defined(NO_SHA) WOLFSSL_TEST_SUBROUTINE int hmac_sha_test(void)