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

ruby-changes:20926

From: emboss <ko1@a...>
Date: Mon, 15 Aug 2011 10:20:39 +0900 (JST)
Subject: [ruby-changes:20926] emboss:r32975 (ruby_1_9_3): * backport r32973 from trunk.

emboss	2011-08-15 10:20:27 +0900 (Mon, 15 Aug 2011)

  New Revision: 32975

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

  Log:
    * backport r32973 from trunk.
    
    * 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]

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/ext/openssl/ossl_ssl.c
    branches/ruby_1_9_3/test/openssl/test_ssl.rb

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 32974)
+++ ruby_1_9_3/ChangeLog	(revision 32975)
@@ -1,3 +1,11 @@
+Mon Aug 15 10:16:55 2011  Martin Bosslet  <Martin.Bosslet@g...>
+	* backport r32973 from trunk.
+
+	* 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]
+
 Sat Aug 13 22:17:27 2011  Nobuyoshi Nakada  <nobu@r...>
 
 	* tool/mkconfig.rb: do not make the entries related to sitedir and
Index: ruby_1_9_3/ext/openssl/ossl_ssl.c
===================================================================
--- ruby_1_9_3/ext/openssl/ossl_ssl.c	(revision 32974)
+++ ruby_1_9_3/ext/openssl/ossl_ssl.c	(revision 32975)
@@ -1997,6 +1997,9 @@
 #if defined(SSL_OP_NO_TICKET)
     ossl_ssl_def_const(OP_NO_TICKET);
 #endif
+#if defined(SSL_OP_NO_COMPRESSION)
+    ossl_ssl_def_const(OP_NO_COMPRESSION);
+#endif
     ossl_ssl_def_const(OP_PKCS1_CHECK_1);
     ossl_ssl_def_const(OP_PKCS1_CHECK_2);
     ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
Index: ruby_1_9_3/test/openssl/test_ssl.rb
===================================================================
--- ruby_1_9_3/test/openssl/test_ssl.rb	(revision 32974)
+++ ruby_1_9_3/test/openssl/test_ssl.rb	(revision 32975)
@@ -9,6 +9,15 @@
     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|

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

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