Skip to content

Commit

Permalink
Updates due to peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
billphipps committed Sep 24, 2024
1 parent c16ebae commit 0d158fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wolfcrypt/src/cmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions wolfssl/wolfcrypt/cmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d158fc

Please sign in to comment.