Allow wolfSSL_RAND_Init to pass if already initialized

This commit is contained in:
Eric Blankenhorn
2023-05-19 17:08:44 -05:00
parent a06bd777c0
commit 3e95ad9549

View File

@@ -35785,6 +35785,11 @@ int wolfSSL_RAND_Init(void)
ret = WOLFSSL_SUCCESS; ret = WOLFSSL_SUCCESS;
} }
} }
else {
/* GlobalRNG is already initialized */
ret = WOLFSSL_SUCCESS;
}
wc_UnLockMutex(&globalRNGMutex); wc_UnLockMutex(&globalRNGMutex);
} }
#endif #endif