Skip to content

Commit 8c1ab78

Browse files
committed
Add missing wc_AesInit calls: small cleanup.
1 parent 3158e04 commit 8c1ab78

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18165,7 +18165,7 @@ static int test_wc_GmacUpdate(void)
1816518165

1816618166
#ifdef WOLFSSL_AES_192
1816718167
ExpectNotNull(XMEMSET(&gmac, 0, sizeof(Gmac)));
18168-
ExpectIntEQ(wc_AesInit(&gmac.aes, NULL, INVALID_DEVID), 0);
18168+
ExpectIntEQ(wc_AesInit(&gmac.aes, HEAP_HINT, INVALID_DEVID), 0);
1816918169
ExpectIntEQ(wc_GmacSetKey(&gmac, key24, sizeof(key24)/sizeof(byte)), 0);
1817018170
ExpectIntEQ(wc_GmacUpdate(&gmac, iv2, sizeof(iv2), authIn2, sizeof(authIn2),
1817118171
tagOut2, sizeof(tag2)), 0);
@@ -18174,7 +18174,7 @@ static int test_wc_GmacUpdate(void)
1817418174

1817518175
#ifdef WOLFSSL_AES_256
1817618176
ExpectNotNull(XMEMSET(&gmac, 0, sizeof(Gmac)));
18177-
ExpectIntEQ(wc_AesInit(&gmac.aes, NULL, INVALID_DEVID), 0);
18177+
ExpectIntEQ(wc_AesInit(&gmac.aes, HEAP_HINT, INVALID_DEVID), 0);
1817818178
ExpectIntEQ(wc_GmacSetKey(&gmac, key32, sizeof(key32)/sizeof(byte)), 0);
1817918179
ExpectIntEQ(wc_GmacUpdate(&gmac, iv3, sizeof(iv3), authIn3, sizeof(authIn3),
1818018180
tagOut3, sizeof(tag3)), 0);

wolfcrypt/src/cmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ int wc_InitCmac_ex(Cmac* cmac, const byte* key, word32 keySz,
137137
return BAD_FUNC_ARG;
138138
}
139139

140-
ret = wc_AesInit(&cmac->aes, NULL, devId);
140+
ret = wc_AesInit(&cmac->aes, heap, devId);
141141

142142
#if defined(WOLFSSL_SE050) && defined(WOLFSSL_SE050_CRYPT)
143143
cmac->useSWCrypt = useSW;

0 commit comments

Comments
 (0)