summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_bn.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-18 18:19:33 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-18 18:19:33 +0900
commitb5588edc0a538de840c79e0bbc9d271ba0c5a711 (patch)
treec314322a874f6525a1653f3f2b244c2a59204820 /ext/openssl/ossl_bn.h
parent74ab2c3b463da4d98803fe694acad831938a97e5 (diff)
openssl is ractor-safe
ossl_bn_ctx is C's global variable and it should be ractor-local to make it ractor-safe.
Diffstat (limited to 'ext/openssl/ossl_bn.h')
-rw-r--r--ext/openssl/ossl_bn.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_bn.h b/ext/openssl/ossl_bn.h
index a19ba19487..1cc041fc22 100644
--- a/ext/openssl/ossl_bn.h
+++ b/ext/openssl/ossl_bn.h
@@ -13,7 +13,8 @@
extern VALUE cBN;
extern VALUE eBNError;
-extern BN_CTX *ossl_bn_ctx;
+BN_CTX *ossl_bn_ctx_get(void);
+#define ossl_bn_ctx ossl_bn_ctx_get()
#define GetBNPtr(obj) ossl_bn_value_ptr(&(obj))