minor fixes for AES-EAX implementation and test routines.

This commit is contained in:
Daniel Pouzzner
2023-10-08 18:02:52 -05:00
parent 832e0f3726
commit 61371d403a
2 changed files with 7 additions and 4 deletions

View File

@ -12150,7 +12150,7 @@ int wc_AesEaxDecryptFinal(AesEax* eax,
^ eax->ciphertextCmacFinal[i];
}
if (ConstantCompare((const byte*)authTag, authIn, authInSz) != 0) {
if (ConstantCompare((const byte*)authTag, authIn, (int)authInSz) != 0) {
ret = AES_EAX_AUTH_E;
}
else {

View File

@ -674,7 +674,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t certpiv_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_siv_test(void);
#endif
#if defined(WOLFSSL_AES_EAX)
#if defined(WOLFSSL_AES_EAX) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void);
#endif /* WOLFSSL_AES_EAX */
@ -1439,7 +1440,8 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
#endif
#endif
#if defined(WOLFSSL_AES_EAX)
#if defined(WOLFSSL_AES_EAX) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
if ( (ret = aes_eax_test()) != 0)
TEST_FAIL("AES-EAX test failed!\n", ret);
else
@ -12996,7 +12998,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesccm_test(void)
#endif /* HAVE_AESCCM */
#if defined(WOLFSSL_AES_EAX)
#if defined(WOLFSSL_AES_EAX) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void)
{