Refactor of AES wc_AesSetKeyLocal and wc_AesSetKey for software only use. Added missing aes argument check on wc_AesSetKeyDirect.

This commit is contained in:
David Garske
2020-09-10 11:52:30 -07:00
committed by Daniel Pouzzner
parent a75f88cbcd
commit c0823c8a7e

View File

@@ -2851,14 +2851,7 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
ret = wc_AesSetIV(aes, iv);
#if defined(WOLFSSL_DEVCRYPTO) && \
(defined(WOLFSSL_DEVCRYPTO_AES) || defined(WOLFSSL_DEVCRYPTO_CBC))
aes->ctx.cfd = -1;
#endif
#ifdef WOLFSSL_IMX6_CAAM_BLOB
ForceZero(local, sizeof(local));
#endif
return ret;
return wc_AesSetKeyLocal(aes, userKey, keylen, iv, dir);
}
int wc_AesSetKey(Aes* aes, const byte* userKey, word32 keylen,