forked from wolfSSL/wolfssl
Test Fixes
1. Found a problem in AES-GCM encrypt where it could step on the ciphertext with the correct sized IV.
This commit is contained in:
@ -9041,11 +9041,11 @@ int wc_AesGcmEncrypt_ex(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
XMEMCPY(ivOut, aes->reg, ivOutSz);
|
||||
ret = wc_AesGcmEncrypt(aes, out, in, sz,
|
||||
(byte*)aes->reg, ivOutSz,
|
||||
authTag, authTagSz,
|
||||
authIn, authInSz);
|
||||
XMEMCPY(ivOut, aes->reg, ivOutSz);
|
||||
IncCtr((byte*)aes->reg, ivOutSz);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user