aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-18 18:19:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 21:46:30 +0900
commit9e7cf9e930cb986a04e312cb576814254dff13be (patch)
treebdbb4566172e9c4f608f14cb65e8ecb277b163a3 /ext/openssl/ossl.c
parentf2d004679a62408a89d7304b229c24e789b94776 (diff)
downloadruby-openssl-9e7cf9e930cb986a04e312cb576814254dff13be.tar.gz
openssl is ractor-safe
ossl_bn_ctx is C's global variable and it should be ractor-local to make it ractor-safe. ruby/ruby@b5588edc0a538de840c79e0bbc9d271ba0c5a711
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 523d72e2..34c6278f 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -1126,6 +1126,10 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
void
Init_openssl(void)
{
+#if HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
/*
* Init timezone info