1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/openssl
rhe 118ee2a734 openssl: fix possible SEGV on race between SSLSocket#stop and #connect
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct
  here. Since some methods such as SSLSocket#connect releases GVL,
  there is a chance of use after free if we free the SSL from another
  thread. SSLSocket#stop was documented as "prepares it for another
  connection" so this is a slightly incompatible change. However when
  this sentence was added (r30090, Add toplevel documentation for
  OpenSSL, 2010-12-06), it didn't actually. The current behavior is
  from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15).
  [ruby-core:74978] [Bug #12292]

* ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc.

* test/openssl/test_ssl.rb: Test this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21 07:25:00 +00:00
..
test_asn1.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_bn.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_buffering.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_cipher.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_config.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_digest.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_engine.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_fips.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_hmac.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_ns_spki.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_ocsp.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_pair.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_partial_record_read.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
test_pkcs5.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_pkcs7.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_pkcs12.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_pkey_dh.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_pkey_dsa.rb openssl: improve handling of password for encrypted PEM 2016-05-20 15:05:25 +00:00
test_pkey_ec.rb openssl: add OpenSSL::PKey::EC#private? and #public? 2016-05-21 05:30:48 +00:00
test_pkey_rsa.rb openssl: improve handling of password for encrypted PEM 2016-05-20 15:05:25 +00:00
test_random.rb test_random.rb: skip old OpenSSL 2016-05-18 08:06:23 +00:00
test_ssl.rb openssl: fix possible SEGV on race between SSLSocket#stop and #connect 2016-05-21 07:25:00 +00:00
test_ssl_session.rb openssl: don't test default session lifetime value 2016-05-20 04:36:03 +00:00
test_x509attr.rb openssl: check argument type in OpenSSL::X509::Attribute#value= 2016-05-19 04:12:57 +00:00
test_x509cert.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_x509crl.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_x509ext.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_x509name.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_x509req.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
test_x509store.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00
utils.rb openssl: clear OpenSSL error queue before return to Ruby 2016-05-18 04:07:47 +00:00