aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index e184c9fd1a..23a7e49b6d 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -459,6 +459,7 @@ ossl_fips_mode_set(VALUE self, VALUE enabled)
#endif
}
+#if !defined(HAVE_OPENSSL_110_THREADING_API)
/**
* Stores locks needed for OpenSSL thread safety
*/
@@ -546,6 +547,7 @@ static void Init_ossl_locks(void)
CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
}
+#endif /* !HAVE_OPENSSL_110_THREADING_API */
/*
* OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
@@ -1144,7 +1146,9 @@ Init_openssl(void)
*/
ossl_s_to_der = rb_intern("to_der");
+#if !defined(HAVE_OPENSSL_110_THREADING_API)
Init_ossl_locks();
+#endif
/*
* Init components