Skip to content

Commit d83f2fa

Browse files
Merge pull request #6850 from douzzer/20231008-Wconversion-and-Aes-Eax-FIPS-fixes
20231008-Wconversion-and-Aes-Eax-FIPS-fixes
2 parents 832e0f3 + 61371d4 commit d83f2fa

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

wolfcrypt/src/aes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12150,7 +12150,7 @@ int wc_AesEaxDecryptFinal(AesEax* eax,
1215012150
^ eax->ciphertextCmacFinal[i];
1215112151
}
1215212152

12153-
if (ConstantCompare((const byte*)authTag, authIn, authInSz) != 0) {
12153+
if (ConstantCompare((const byte*)authTag, authIn, (int)authInSz) != 0) {
1215412154
ret = AES_EAX_AUTH_E;
1215512155
}
1215612156
else {

wolfcrypt/test/test.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t certpiv_test(void);
674674
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_siv_test(void);
675675
#endif
676676

677-
#if defined(WOLFSSL_AES_EAX)
677+
#if defined(WOLFSSL_AES_EAX) && \
678+
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
678679
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void);
679680
#endif /* WOLFSSL_AES_EAX */
680681

@@ -1439,7 +1440,8 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
14391440
#endif
14401441
#endif
14411442

1442-
#if defined(WOLFSSL_AES_EAX)
1443+
#if defined(WOLFSSL_AES_EAX) && \
1444+
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
14431445
if ( (ret = aes_eax_test()) != 0)
14441446
TEST_FAIL("AES-EAX test failed!\n", ret);
14451447
else
@@ -12996,7 +12998,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesccm_test(void)
1299612998
#endif /* HAVE_AESCCM */
1299712999

1299813000

12999-
#if defined(WOLFSSL_AES_EAX)
13001+
#if defined(WOLFSSL_AES_EAX) && \
13002+
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
1300013003

1300113004
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void)
1300213005
{

0 commit comments

Comments
 (0)