Move the SCT List extension parser into libssl.
[openssl.git] / crypto / lock.c
index 49db044fc175dc91c692089ab3ed28354226cc32..6f6681d54f4ecd5cc02c0ab31418599e81b534be 100644 (file)
 
 #include "cryptlib.h"
 #include <openssl/safestack.h>
+#ifdef OPENSSL_FIPS
+#include <openssl/fips.h>
+#endif
 
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
 static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
@@ -380,6 +383,9 @@ void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*func)
 void CRYPTO_set_dynlock_lock_callback(void (*func)(int mode,
        struct CRYPTO_dynlock_value *l, const char *file, int line))
        {
+#ifdef OPENSSL_FIPS
+       FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
+#endif
        dynlock_lock_callback=func;
        }
 
@@ -405,6 +411,9 @@ 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))
        {
+#ifdef OPENSSL_FIPS
+       FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
+#endif
        locking_callback=func;
        }