diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-12-18 18:19:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-14 21:46:30 +0900 |
commit | 9e7cf9e930cb986a04e312cb576814254dff13be (patch) | |
tree | bdbb4566172e9c4f608f14cb65e8ecb277b163a3 /ext/openssl/ossl_bn.h | |
parent | f2d004679a62408a89d7304b229c24e789b94776 (diff) | |
download | ruby-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_bn.h')
-rw-r--r-- | ext/openssl/ossl_bn.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_bn.h b/ext/openssl/ossl_bn.h index a19ba194..1cc041fc 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)) |