Skip to content

Commit edc1643

Browse files
committed
Fix from review
1 parent 1e54e99 commit edc1643

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/api/test_pkcs12.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ int test_wc_PKCS12_encrypted_content_bounds(void)
423423

424424
byte regKey[32];
425425
byte regCiphertext[16];
426-
Aes* regAes = NULL;
426+
Aes regAes;
427427
WC_PKCS12* regP12 = NULL;
428428
byte* regPkey = NULL;
429429
byte* regCert = NULL;
@@ -436,12 +436,12 @@ int test_wc_PKCS12_encrypted_content_bounds(void)
436436
2048, 32, WC_SHA256), 0);
437437

438438
/* Encrypt the malformed plaintext */
439-
ExpectNotNull(regAes = wc_AesNew(NULL, INVALID_DEVID, NULL));
440-
ExpectIntEQ(wc_AesSetKey(regAes, regKey, 32, regIv,
439+
ExpectIntEQ(wc_AesInit(&regAes, NULL, INVALID_DEVID), 0);
440+
ExpectIntEQ(wc_AesSetKey(&regAes, regKey, 32, regIv,
441441
AES_ENCRYPTION), 0);
442-
ExpectIntEQ(wc_AesCbcEncrypt(regAes, regCiphertext, regPlaintext,
442+
ExpectIntEQ(wc_AesCbcEncrypt(&regAes, regCiphertext, regPlaintext,
443443
sizeof(regPlaintext)), 0);
444-
wc_AesFree(regAes);
444+
wc_AesFree(&regAes);
445445

446446
/* Patch ciphertext into the DER template at offset 154 */
447447
XMEMCPY(regDer + 154, regCiphertext, sizeof(regCiphertext));

0 commit comments

Comments
 (0)