5454 #define WOLFKM_DRIVER_ISA_EXT ""
5555#endif
5656
57- #ifdef HAVE_FIPS_VERSION
58- #if HAVE_FIPS_VERSION >= 5
57+ #ifdef HAVE_FIPS
58+ #ifndef HAVE_FIPS_VERSION
59+ #define WOLFKM_DRIVER_FIPS "-fips-140"
60+ #elif HAVE_FIPS_VERSION >= 5
5961 #define WOLFKM_DRIVER_FIPS "-fips-140-3"
6062 #elif HAVE_FIPS_VERSION == 2
6163 #define WOLFKM_DRIVER_FIPS "-fips-140-2"
@@ -1648,7 +1650,7 @@ static int aes_xts_128_test(void)
16481650 0xff , 0x8d , 0xbc , 0x1d , 0x9f , 0x7f , 0xc8 , 0x22
16491651 };
16501652
1651- #ifndef HAVE_FIPS_VERSION /* FIPS requires different keys for main and tweak. */
1653+ #ifndef HAVE_FIPS /* FIPS requires different keys for main and tweak. */
16521654 WOLFSSL_SMALL_STACK_STATIC const unsigned char k3 [] = {
16531655 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 ,
16541656 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 ,
@@ -1673,7 +1675,7 @@ static int aes_xts_128_test(void)
16731675 0xA0 , 0x85 , 0xD2 , 0x69 , 0x6E , 0x87 , 0x0A , 0xBF ,
16741676 0xB5 , 0x5A , 0xDD , 0xCB , 0x80 , 0xE0 , 0xFC , 0xCD
16751677 };
1676- #endif /* HAVE_FIPS_VERSION */
1678+ #endif /* HAVE_FIPS */
16771679
16781680#if defined(WOLFSSL_SMALL_STACK ) && !defined(WOLFSSL_NO_MALLOC )
16791681 if ((aes = (XtsAes * )XMALLOC (sizeof (* aes ), HEAP_HINT , DYNAMIC_TYPE_AES ))
@@ -1866,7 +1868,7 @@ static int aes_xts_128_test(void)
18661868 if (XMEMCMP (p2 , buf , sizeof (p2 )))
18671869 ERROR_OUT (LINUXKM_LKCAPI_AES_KAT_MISMATCH_E , out );
18681870
1869- #ifndef HAVE_FIPS_VERSION
1871+ #ifndef HAVE_FIPS
18701872
18711873 /* Test ciphertext stealing in-place. */
18721874 XMEMCPY (buf , p3 , sizeof (p3 ));
@@ -1895,7 +1897,7 @@ static int aes_xts_128_test(void)
18951897 if (XMEMCMP (p3 , buf , sizeof (p3 )))
18961898 ERROR_OUT (LINUXKM_LKCAPI_AES_KAT_MISMATCH_E , out );
18971899
1898- #endif /* HAVE_FIPS_VERSION */
1900+ #endif /* HAVE_FIPS */
18991901
19001902#if !defined(BENCH_EMBEDDED ) && !defined(HAVE_CAVIUM ) && \
19011903 !defined(WOLFSSL_AFALG )
0 commit comments