From c0823c8a7eeb239e0b2dd27eaf9d73abe465b1f4 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 10 Sep 2020 11:52:30 -0700 Subject: [PATCH] Refactor of AES `wc_AesSetKeyLocal` and `wc_AesSetKey` for software only use. Added missing `aes` argument check on `wc_AesSetKeyDirect`. --- wolfcrypt/src/aes.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index a0d144d34..d7051f760 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -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,