@@ -25514,7 +25514,7 @@ static int wolfSSL_RAND_InitMutex(void)
2551425514#ifdef OPENSSL_EXTRA
2551525515
2551625516#if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
25517- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
25517+ (( defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || defined(HAVE_SELFTEST) )
2551825518/* In older FIPS bundles add check for reseed here since it does not exist in
2551925519 * the older random.c certified files. */
2552025520static pid_t currentRandPid = 0;
@@ -25533,7 +25533,9 @@ int wolfSSL_RAND_Init(void)
2553325533 ret = wc_InitRng(&globalRNG);
2553425534 if (ret == 0) {
2553525535 #if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
25536- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
25536+ ((defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || \
25537+ defined(HAVE_SELFTEST))
25538+
2553725539 currentRandPid = getpid();
2553825540 #endif
2553925541 initGlobalRNG = 1;
@@ -26014,7 +26016,8 @@ int wolfSSL_RAND_bytes(unsigned char* buf, int num)
2601426016 */
2601526017 if (initGlobalRNG) {
2601626018 #if defined(HAVE_GETPID) && !defined(WOLFSSL_NO_GETPID) && \
26017- defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
26019+ ((defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)) || \
26020+ defined(HAVE_SELFTEST))
2601826021 pid_t p;
2601926022
2602026023 p = getpid();
0 commit comments