File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6244,20 +6244,20 @@ int wolfSSL_Init(void)
62446244 return BAD_MUTEX_E;
62456245 }
62466246
6247- if ((ret == WOLFSSL_SUCCESS) && (initRefCount == 0)) {
6248- /* Initialize crypto for use with TLS connection */
6249-
62506247 #if FIPS_VERSION_GE(5,1)
6248+ if ((ret == WOLFSSL_SUCCESS) && (initRefCount == 0)) {
62516249 ret = wolfCrypt_SetPrivateKeyReadEnable_fips(1, WC_KEYTYPE_ALL);
62526250 if (ret == 0)
62536251 ret = WOLFSSL_SUCCESS;
6252+ }
62546253 #endif
62556254
6256- if (ret == WOLFSSL_SUCCESS) {
6257- if (wolfCrypt_Init() != 0) {
6258- WOLFSSL_MSG("Bad wolfCrypt Init");
6259- ret = WC_INIT_E;
6260- }
6255+ if ((ret == WOLFSSL_SUCCESS) && (initRefCount == 0)) {
6256+ /* Initialize crypto for use with TLS connection */
6257+
6258+ if (wolfCrypt_Init() != 0) {
6259+ WOLFSSL_MSG("Bad wolfCrypt Init");
6260+ ret = WC_INIT_E;
62616261 }
62626262
62636263#if defined(HAVE_GLOBAL_RNG) && !defined(WOLFSSL_MUTEX_INITIALIZER)
You can’t perform that action at this time.
0 commit comments