summaryrefslogtreecommitdiff
path: root/test/openssl/test_ssl.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 17:21:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 17:21:23 +0000
commita50ba967793b7fe107a6c38e00019d72740871b6 (patch)
tree66b3d1b567b2c2631383f9bb63cc7f64482b1f87 /test/openssl/test_ssl.rb
parent6fb2ec53949c149323d2b0f264bf4c68be558b8f (diff)
test_ssl.rb: fix ssl option flags tests
* test/openssl/test_ssl.rb (test_setting_twice): ignore fixed falgs. some flags like SSL_OP_NO_SSL_MASK cannot change. * test/openssl/test_ssl.rb (test_options_setting_nil_means_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/test_ssl.rb')
-rw-r--r--test/openssl/test_ssl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 06e8d96b85..4398d7a0c5 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -28,7 +28,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
def test_setting_twice
ctx = OpenSSL::SSL::SSLContext.new
ctx.options = 4
- assert_equal 4, ctx.options
+ assert_equal 4, (ctx.options & OpenSSL::SSL::OP_ALL)
ctx.options = OpenSSL::SSL::OP_ALL
assert_equal OpenSSL::SSL::OP_ALL, ctx.options
end
@@ -36,7 +36,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
def test_options_setting_nil_means_all
ctx = OpenSSL::SSL::SSLContext.new
ctx.options = nil
- assert_equal OpenSSL::SSL::OP_ALL, ctx.options
+ assert_equal(OpenSSL::SSL::OP_ALL, (OpenSSL::SSL::OP_ALL & ctx.options))
end
def test_setting_options_raises_after_setup