Updates due to peer review

This commit is contained in:
Bill Phipps
2024-09-24 12:06:19 -04:00
parent c16ebaeb47
commit 0d158fc663
2 changed files with 7 additions and 2 deletions

View File

@ -297,9 +297,11 @@ int wc_CmacFinalNoFree(Cmac* cmac, byte* out, word32* outSz)
ret = wc_CryptoCb_Cmac(cmac, NULL, 0, NULL, 0, out, outSz, cmac->type, NULL);
if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE))
return ret;
/* Clear CRYPTOCB_UNAVAILABLE return code */
ret = 0;
/* fall-through when unavailable */
}
ret = 0;
#endif
switch (cmac->type) {
#if !defined(NO_AES) && defined(WOLFSSL_AES_DIRECT)
@ -343,7 +345,8 @@ int wc_CmacFinalNoFree(Cmac* cmac, byte* out, word32* outSz)
return ret;
}
int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz) {
int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz)
{
int ret = 0;
if (cmac == NULL)

View File

@ -27,7 +27,9 @@
#ifdef WOLFSSL_CMAC
#ifndef NO_AES
#include <wolfssl/wolfcrypt/aes.h>
#endif
#if defined(HAVE_FIPS) && \
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)