Skip to content

Commit 708b797

Browse files
dgarskedanielinux
authored andcommitted
Fix for Renesas RX TSIP AES CTR to make sure the wolfCrypt_Init() is called before trying to setup the crypto callback.
1 parent 3d9beb2 commit 708b797

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libwolfboot.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,9 @@ int aes_init(void)
15781578
int devId = RENESAS_DEVID + 1;
15791579
wrap_enc_key_t* enc_key =(wrap_enc_key_t*)RENESAS_TSIP_INSTALLEDENCKEY_ADDR;
15801580

1581+
/* required to properly setup the crypto callback defaults */
1582+
wolfCrypt_Init(); /* has logic to support being called multiple times */
1583+
15811584
XMEMSET(&aes_enc, 0, sizeof(aes_enc));
15821585
XMEMSET(&aes_dec, 0, sizeof(aes_dec));
15831586
wc_AesInit(&aes_enc, NULL, devId);

0 commit comments

Comments
 (0)