test: don't free AesXts struct in-between tests that reuse the key
This commit is contained in:
parent
59ea65bad3
commit
cebb127ac3
@ -7909,7 +7909,6 @@ static int aes_xts_128_test(void)
|
||||
ERROR_OUT(-5410, out);
|
||||
if (XMEMCMP(p1, buf, AES_BLOCK_SIZE))
|
||||
ERROR_OUT(-5411, out);
|
||||
wc_AesXtsFree(aes);
|
||||
|
||||
/* fail case with decrypting using wrong key */
|
||||
XMEMSET(buf, 0, sizeof(buf));
|
||||
@ -7922,6 +7921,8 @@ static int aes_xts_128_test(void)
|
||||
if (XMEMCMP(p2, buf, sizeof(p2)) == 0) /* fail case with wrong key */
|
||||
ERROR_OUT(-5413, out);
|
||||
|
||||
wc_AesXtsFree(aes);
|
||||
|
||||
/* set correct key and retest */
|
||||
XMEMSET(buf, 0, sizeof(buf));
|
||||
if (wc_AesXtsSetKey(aes, k2, sizeof(k2), AES_DECRYPTION,
|
||||
|
Loading…
x
Reference in New Issue
Block a user