[前][次][番号順一覧][スレッド一覧]

ruby-changes:42023

From: normal <ko1@a...>
Date: Mon, 14 Mar 2016 10:20:20 +0900 (JST)
Subject: [ruby-changes:42023] normal:r54097 (trunk): document OpenSSL::SSL::SSLContext#setup as MT-unsafe

normal	2016-03-14 10:20:14 +0900 (Mon, 14 Mar 2016)

  New Revision: 54097

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54097

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl_ssl.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54096)
+++ ChangeLog	(revision 54097)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Mar 14 10:02:23 2016  Eric Wong  <e@8...>
+
+	* 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@r...>
 
 	* include/ruby/win32.h (O_SHARE_DELETE): change to fit Fixnum
Index: ext/openssl/ossl_ssl.c
===================================================================
--- ext/openssl/ossl_ssl.c	(revision 54096)
+++ ext/openssl/ossl_ssl.c	(revision 54097)
@@ -687,8 +687,8 @@ ossl_sslctx_set_options(VALUE self, VALU https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L687
  *    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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]