diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-14 01:20:14 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-14 01:20:14 +0000 |
commit | 9749511dfec95fef6168bcb53d25041c2d529fc5 (patch) | |
tree | 564d1d4e0d480b25574982712f4acb0607a5f690 | |
parent | bd6189116721de60db28eb0e0c364edf51308e0b (diff) | |
download | ruby-9749511dfec95fef6168bcb53d25041c2d529fc5.tar.gz |
document OpenSSL::SSL::SSLContext#setup as MT-unsafe
On a cursory inspection, using rb_block_call for extra_chain_cert
is thread-unsafe. There may be other instances of thread-unsafe
behavior in this method, but one is enough.
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe
[ruby-core:73803] [Bug #12069]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/openssl/ossl_ssl.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Mar 14 10:02:23 2016 Eric Wong <e@80x24.org> + + * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe + [ruby-core:73803] [Bug #12069] + Sun Mar 13 09:43:23 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> * include/ruby/win32.h (O_SHARE_DELETE): change to fit Fixnum diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 4075d6f001..90ce762a31 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -687,8 +687,8 @@ ossl_sslctx_set_options(VALUE self, VALUE options) * ctx.setup => nil # thereafter * * This method is called automatically when a new SSLSocket is created. - * Normally you do not need to call this method (unless you are writing an - * extension in C). + * However, it is not thread-safe and must be called before creating + * SSLSocket objects in a multi-threaded program. */ static VALUE ossl_sslctx_setup(VALUE self) |