[前][次][番号順一覧][スレッド一覧]

ruby-changes:33199

From: naruse <ko1@a...>
Date: Fri, 7 Mar 2014 01:42:31 +0900 (JST)
Subject: [ruby-changes:33199] naruse:r45278 (trunk): fix r45274; it change default but doesn't change tests [Bug #9424]

naruse	2014-03-07 01:42:27 +0900 (Fri, 07 Mar 2014)

  New Revision: 45278

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45278

  Log:
    fix r45274; it change default but doesn't change tests [Bug #9424]
    
    RUN TESTS BEFORE COMMIT!!!

  Modified files:
    trunk/test/openssl/test_ssl.rb
Index: test/openssl/test_ssl.rb
===================================================================
--- test/openssl/test_ssl.rb	(revision 45277)
+++ test/openssl/test_ssl.rb	(revision 45278)
@@ -4,9 +4,13 @@ if defined?(OpenSSL) https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L4
 
 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]