Skip to content

Commit 76b75f8

Browse files
committed
Add call to wolfCrypt_Init()
1 parent 612dc96 commit 76b75f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/internal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,8 +3351,10 @@ int WP11_Library_Init(void)
33513351
ret = WP11_Lock_Init(&globalLock);
33523352
if (ret == 0)
33533353
#ifdef WOLFSSL_MAXQ10XX_CRYPTO
3354-
/* TODO: can we even do this? Has wolfCrypt even been initialized yet? */
3355-
ret = wc_InitRng_ex(&globalRandom, NULL, MAXQ_DEVICE_ID);
3354+
ret = wolfCrypt_Init();
3355+
if (ret == 0) {
3356+
ret = wc_InitRng_ex(&globalRandom, NULL, MAXQ_DEVICE_ID);
3357+
}
33563358
#else
33573359
ret = wc_InitRng(&globalRandom);
33583360
#endif

0 commit comments

Comments
 (0)