Skip to content

Commit fa0696d

Browse files
committed
Make some fixes for integration with new FIPS code.
1 parent 8debda1 commit fa0696d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/we_internal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,14 @@ static int wolfengine_init(ENGINE *e)
789789

790790
WOLFENGINE_ENTER(WE_LOG_ENGINE, "wolfengine_init");
791791

792+
#if defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION == 5
793+
wolfCrypt_SetPrivateKeyReadEnable_fips(1, WC_KEYTYPE_ALL);
794+
#endif
792795
#if defined(WE_HAVE_ECC) || defined(WE_HAVE_AESGCM) || defined(WE_HAVE_RSA) || \
793796
defined(WE_HAVE_DH) || defined(WE_HAVE_RANDOM)
797+
#ifdef WC_RNG_SEED_CB
798+
wc_SetSeed_Cb(wc_GenerateSeed);
799+
#endif
794800
ret = we_init_random();
795801
#endif
796802
#ifdef WE_HAVE_SHA1

0 commit comments

Comments
 (0)