diff options
author | emboss <emboss@ruby-lang.org> | 2011-08-15 01:10:26 +0000 |
---|---|---|
committer | emboss <emboss@ruby-lang.org> | 2011-08-15 01:10:26 +0000 |
commit | b7445d4e2d5c1477293832e972069f9397857baf (patch) | |
tree | f859cd401c31dc97579d4b4df31693c1bca194ad /test | |
parent | bfc6be539cb2bd480f71c8cfd859824471430ed4 (diff) | |
download | ruby-openssl-history-b7445d4e2d5c1477293832e972069f9397857baf.tar.gz |
* ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
* test/openssl/test_ssl.rb: Add a test for it.
Thanks to Eric Wong for the patch.
[Ruby 1.9 - Feature #5183] [ruby-core:38911]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ssl.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb index 07154ea..a081931 100644 --- a/test/test_ssl.rb +++ b/test/test_ssl.rb @@ -9,6 +9,15 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase assert_equal(ctx.setup, nil) end + def test_ctx_setup_no_compression + ctx = OpenSSL::SSL::SSLContext.new + ctx.options = OpenSSL::SSL::OP_ALL | OpenSSL::SSL::OP_NO_COMPRESSION + assert_equal(ctx.setup, true) + assert_equal(ctx.setup, nil) + assert_equal(OpenSSL::SSL::OP_NO_COMPRESSION, + ctx.options & OpenSSL::SSL::OP_NO_COMPRESSION) + end if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) + def test_not_started_session skip "non socket argument of SSLSocket.new is not supported on this platform" if /mswin|mingw/ =~ RUBY_PLATFORM open(__FILE__) do |f| |