summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/openssl/test_ssl.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 18c0bce95b..8385f3fc78 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -4,9 +4,13 @@ if defined?(OpenSSL)
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
- TLS_DEFAULT_OPS = defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
- OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
- OpenSSL::SSL::OP_ALL
+ TLS_DEFAULT_OPS = -> {
+ opts = OpenSSL::SSL::OP_ALL
+ opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
+ opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
+ opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
+ opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
+ }.call
def test_ctx_setup
ctx = OpenSSL::SSL::SSLContext.new