mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-04-28 21:03:23 +02:00
Fix for for crypto callback devCtx on symmetric algorithms (missing for SHA1 and CMAC). Fix for HMAC to use devId for hashing. Fixes for CMAC crypto callbacks and testing.
This commit is contained in:
@@ -95,16 +95,18 @@ int wc_InitCmac_ex(Cmac* cmac, const byte* key, word32 keySz,
|
||||
|
||||
XMEMSET(cmac, 0, sizeof(Cmac));
|
||||
|
||||
#ifdef WOLF_CRYPTO_CB
|
||||
#ifdef WOLF_CRYPTO_CB
|
||||
if (devId != INVALID_DEVID) {
|
||||
cmac->devId = devId;
|
||||
cmac->devCtx = NULL;
|
||||
|
||||
ret = wc_CryptoCb_Cmac(cmac, key, keySz, NULL, 0, NULL, NULL,
|
||||
type, unused);
|
||||
if (ret != CRYPTOCB_UNAVAILABLE)
|
||||
return ret;
|
||||
/* fall-through when unavailable */
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (key == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
Reference in New Issue
Block a user