Skip to content

Commit b8a3834

Browse files
committed
Disable 192-bit tests in FIPS mode
1 parent 9063093 commit b8a3834

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

wolfcrypt/test/test.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11585,6 +11585,8 @@ static wc_test_ret_t aes_xts_128_test(void)
1158511585
}
1158611586
#endif /* WOLFSSL_AES_128 */
1158711587

11588+
#ifndef HAVE_FIPS
11589+
/* FIPS won't allow for XTS-384 (two 192-bit keys) */
1158811590
#ifdef WOLFSSL_AES_192
1158911591
static wc_test_ret_t aes_xts_192_test(void)
1159011592
{
@@ -12288,7 +12290,7 @@ static wc_test_ret_t aes_xts_192_test(void)
1228812290
return ret;
1228912291
}
1229012292
#endif /* WOLFSSL_AES_192 */
12291-
12293+
#endif /* HAVE_FIPS */
1229212294

1229312295
#ifdef WOLFSSL_AES_256
1229412296
static wc_test_ret_t aes_xts_256_test(void)
@@ -14637,11 +14639,14 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_xts_test(void)
1463714639
return ret;
1463814640
#endif
1463914641

14642+
/* FIPS won't allow for XTS-384 (two 192-bit keys) */
14643+
#ifndef HAVE_FIPS
1464014644
#ifdef WOLFSSL_AES_192
1464114645
ret = aes_xts_192_test();
1464214646
if (ret != 0)
1464314647
return ret;
1464414648
#endif
14649+
#endif
1464514650

1464614651
#ifdef WOLFSSL_AES_256
1464714652
ret = aes_xts_256_test();

0 commit comments

Comments
 (0)