@@ -25515,7 +25515,7 @@ static int wolfSSL_RAND_InitMutex(void)
2551525515#ifdef OPENSSL_EXTRA
2551625516
2551725517#if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
25518- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
25518+ (( defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || defined(HAVE_SELFTEST) )
2551925519/* In older FIPS bundles add check for reseed here since it does not exist in
2552025520 * the older random.c certified files. */
2552125521static pid_t currentRandPid = 0;
@@ -25534,7 +25534,9 @@ int wolfSSL_RAND_Init(void)
2553425534 ret = wc_InitRng(&globalRNG);
2553525535 if (ret == 0) {
2553625536 #if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
25537- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
25537+ ((defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || \
25538+ defined(HAVE_SELFTEST))
25539+
2553825540 currentRandPid = getpid();
2553925541 #endif
2554025542 initGlobalRNG = 1;
@@ -26015,7 +26017,8 @@ int wolfSSL_RAND_bytes(unsigned char* buf, int num)
2601526017 */
2601626018 if (initGlobalRNG) {
2601726019 #if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
26018- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
26020+ ((defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || \
26021+ defined(HAVE_SELFTEST))
2601926022 pid_t p;
2602026023
2602126024 p = getpid();
0 commit comments