diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 09:09:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 09:09:26 +0000 |
commit | 02afafb42ae4ae98140f2c79c67b948e1e6bc577 (patch) | |
tree | 293b883b6987a34a31e9f6d215b348c076c46ef9 /test/openssl | |
parent | 73cf9abd1c88eec81e86f697f29a6cbe58ad3d27 (diff) | |
download | ruby-02afafb42ae4ae98140f2c79c67b948e1e6bc577.tar.gz |
* ext/openssl/ossl_ssl.c (ossl_ssl_close): Fix sync_close to work
when SSL is not started.
This fix the fd leak by test_https_proxy_authentication in
test/net/http/test_https_proxy.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_ssl.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 23dc572870..e99d3d9786 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -680,6 +680,15 @@ end } end + def test_sync_close_without_connect + Socket.open(:INET, :STREAM) {|s| + ssl = OpenSSL::SSL::SSLSocket.new(s) + ssl.sync_close = true + ssl.close + assert(s.closed?) + } + end + private def start_server_version(version, ctx_proc=nil, server_proc=nil, &blk) |