From 3e95ad9549aa4dda4544121bb9ea1d8d73730efd Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Fri, 19 May 2023 17:08:44 -0500 Subject: [PATCH] Allow wolfSSL_RAND_Init to pass if already initialized --- src/ssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index ffd411fda..cbebc61ee 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -35785,6 +35785,11 @@ int wolfSSL_RAND_Init(void) ret = WOLFSSL_SUCCESS; } } + else { + /* GlobalRNG is already initialized */ + ret = WOLFSSL_SUCCESS; + } + wc_UnLockMutex(&globalRNGMutex); } #endif