diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 06:09:40 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 06:09:40 +0000 |
commit | 2cb7a6c0569cf2f1da791f21f6af4ff9bfcb97ac (patch) | |
tree | 1467ad0000a906cad6bc131eb81263519ffd5478 /test | |
parent | e19bd3eaa8bd71cfc9e5bf436527f015b093f31e (diff) |
Backport r34482 from trunk. See #5353
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@34486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_ssl.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 2caadd1c67..177b684e7f 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -532,6 +532,21 @@ class OpenSSL::TestSSL < Test::Unit::TestCase end end end + + def test_unset_OP_ALL + ctx_proc = Proc.new { |ctx| + ctx.options = OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS + } + start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :ctx_proc => ctx_proc){|server, port| + sock = TCPSocket.new("127.0.0.1", port) + ssl = OpenSSL::SSL::SSLSocket.new(sock) + ssl.sync_close = true + ssl.connect + ssl.puts('hello') + assert_equal("hello\n", ssl.gets) + ssl.close + } + end end end |