mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #2401 from SparkiDev/aesni_null_iv
Set the IV to zero when NULL IV and using AESNI
This commit is contained in:
@ -2306,6 +2306,8 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
||||
aes->use_aesni = 1;
|
||||
if (iv)
|
||||
XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE);
|
||||
else
|
||||
XMEMSET(aes->reg, 0, AES_BLOCK_SIZE);
|
||||
if (dir == AES_ENCRYPTION)
|
||||
return AES_set_encrypt_key(userKey, keylen * 8, aes);
|
||||
#ifdef HAVE_AES_DECRYPT
|
||||
|
Reference in New Issue
Block a user