tags 620998 patch
thanks

Hi,

I created the patch which revised this problem.
Please apply this patch.

Best regards,
  Nobuhiro
diff -Nru ruby1.9.1-1.9.2.180/debian/patches/0001-Add-option-which-enable-SSLv2-support.patch ruby1.9.1-1.9.2.180/debian/patches/0001-Add-option-which-enable-SSLv2-support.patch
--- ruby1.9.1-1.9.2.180/debian/patches/0001-Add-option-which-enable-SSLv2-support.patch	1970-01-01 09:00:00.000000000 +0900
+++ ruby1.9.1-1.9.2.180/debian/patches/0001-Add-option-which-enable-SSLv2-support.patch	2011-04-06 13:31:48.000000000 +0900
@@ -0,0 +1,53 @@
+From b983e73adf7a7d3fd07fdf493eee51c22881a6e6 Mon Sep 17 00:00:00 2001
+From: Nobuhiro Iwamatsu <iwama...@nigauri.org>
+Date: Wed, 6 Apr 2011 02:28:09 +0900
+Subject: [PATCH] Add option which enable SSLv2 support
+
+From openssl 1.0, SSLv2 becomes disable by default.
+If you want to use SSLv2 in ruby, you need config with --enable-opensslv2.
+The SSLv2 support is disable by default.
+
+Signed-off-by: Nobuhiro Iwamatsu <iwama...@nigauri.org>
+---
+ ext/openssl/extconf.rb |    8 ++++++++
+ ext/openssl/ossl_ssl.c |    2 ++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
+index b1f2d88..89c6f19 100644
+--- a/ext/openssl/extconf.rb
++++ b/ext/openssl/extconf.rb
+@@ -33,6 +33,14 @@ if with_config("debug") or enable_config("debug")
+   end
+ end
+ 
++## 
++## From openssl 1.0, SSLv2 becomes disable by default.
++## If you want to use SSLv2 in ruby, you need config with --enable-opensslv2.
++##
++if enable_config("opensslv2")
++  $defs << "-DENABLE_OPENSSLV2"
++end
++
+ message "=== Checking for system dependent stuff... ===\n"
+ have_library("nsl", "t_open")
+ have_library("socket", "socket")
+diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
+index d8951fb..d0c9059 100644
+--- a/ext/openssl/ossl_ssl.c
++++ b/ext/openssl/ossl_ssl.c
+@@ -107,9 +107,11 @@ struct {
+     OSSL_SSL_METHOD_ENTRY(TLSv1),
+     OSSL_SSL_METHOD_ENTRY(TLSv1_server),
+     OSSL_SSL_METHOD_ENTRY(TLSv1_client),
++#if defined(ENABLE_OPENSSLV2)
+     OSSL_SSL_METHOD_ENTRY(SSLv2),
+     OSSL_SSL_METHOD_ENTRY(SSLv2_server),
+     OSSL_SSL_METHOD_ENTRY(SSLv2_client),
++#endif
+     OSSL_SSL_METHOD_ENTRY(SSLv3),
+     OSSL_SSL_METHOD_ENTRY(SSLv3_server),
+     OSSL_SSL_METHOD_ENTRY(SSLv3_client),
+-- 
+1.7.4.1
+
diff -Nru ruby1.9.1-1.9.2.180/debian/patches/series ruby1.9.1-1.9.2.180/debian/patches/series
--- ruby1.9.1-1.9.2.180/debian/patches/series	2011-03-12 18:43:01.000000000 +0900
+++ ruby1.9.1-1.9.2.180/debian/patches/series	2011-04-06 13:32:06.000000000 +0900
@@ -25,3 +25,4 @@
 903_skip_base_ruby_check.diff
 20100829-rubygems_disable_update_system.diff
 20100829-rubygems_default_dir.diff
+0001-Add-option-which-enable-SSLv2-support.patch

Reply via email to