Reorganise ECC code so it can use FIPS module.
[openssl.git] / crypto / cryptlib.c
index 14bae0d08c11ac92f9110c8908ad726a1d13b3b6..a453475fdbcacea50678810db511d465881f02c5 100644 (file)
@@ -409,6 +409,10 @@ int (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type,
 void CRYPTO_set_locking_callback(void (*func)(int mode,int type,
                                              const char *file,int line))
        {
+       /* Calling this here ensures initialisation before any threads
+        * are started.
+        */
+       OPENSSL_init();
        locking_callback=func;
        }