forked from wolfSSL/wolfssl
Fix for FIPS and CMAC init.
This commit is contained in:
@@ -26767,8 +26767,15 @@ WOLFSSL_TEST_SUBROUTINE int cmac_test(void)
|
||||
XMEMSET(tag, 0, sizeof(tag));
|
||||
tagSz = AES_BLOCK_SIZE;
|
||||
|
||||
#if !defined(HAVE_FIPS) || \
|
||||
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 3)
|
||||
if (wc_InitCmac_ex(cmac, tc->k, tc->kSz, tc->type, NULL, HEAP_HINT, devId) != 0)
|
||||
#else
|
||||
if (wc_InitCmac(cmac, tc->k, tc->kSz, tc->type, NULL) != 0)
|
||||
#endif
|
||||
{
|
||||
ERROR_OUT(-12000, out);
|
||||
}
|
||||
if (tc->partial) {
|
||||
if (wc_CmacUpdate(cmac, tc->m,
|
||||
tc->mSz/2 - tc->partial) != 0)
|
||||
|
Reference in New Issue
Block a user