mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Updates due to peer review
This commit is contained in:
@ -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);
|
ret = wc_CryptoCb_Cmac(cmac, NULL, 0, NULL, 0, out, outSz, cmac->type, NULL);
|
||||||
if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE))
|
if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE))
|
||||||
return ret;
|
return ret;
|
||||||
|
/* Clear CRYPTOCB_UNAVAILABLE return code */
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
/* fall-through when unavailable */
|
/* fall-through when unavailable */
|
||||||
}
|
}
|
||||||
ret = 0;
|
|
||||||
#endif
|
#endif
|
||||||
switch (cmac->type) {
|
switch (cmac->type) {
|
||||||
#if !defined(NO_AES) && defined(WOLFSSL_AES_DIRECT)
|
#if !defined(NO_AES) && defined(WOLFSSL_AES_DIRECT)
|
||||||
@ -343,7 +345,8 @@ int wc_CmacFinalNoFree(Cmac* cmac, byte* out, word32* outSz)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz) {
|
int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz)
|
||||||
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (cmac == NULL)
|
if (cmac == NULL)
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#ifdef WOLFSSL_CMAC
|
#ifdef WOLFSSL_CMAC
|
||||||
|
|
||||||
|
#ifndef NO_AES
|
||||||
#include <wolfssl/wolfcrypt/aes.h>
|
#include <wolfssl/wolfcrypt/aes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_FIPS) && \
|
#if defined(HAVE_FIPS) && \
|
||||||
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
|
defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
|
||||||
|
Reference in New Issue
Block a user