summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby18-base/patches/patch-ag')
-rw-r--r--lang/ruby18-base/patches/patch-ag16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/ruby18-base/patches/patch-ag b/lang/ruby18-base/patches/patch-ag
new file mode 100644
index 00000000000..3d7f1f0fd78
--- /dev/null
+++ b/lang/ruby18-base/patches/patch-ag
@@ -0,0 +1,16 @@
+$NetBSD: patch-ag,v 1.1 2006/08/02 07:02:44 taca Exp $
+
+--- ext/openssl/lib/openssl/ssl.rb.orig 2005-05-22 19:16:56.000000000 +0900
++++ ext/openssl/lib/openssl/ssl.rb
+@@ -82,8 +82,9 @@ module OpenSSL
+ }
+ if check_common_name
+ cert.subject.to_a.each{|oid, value|
+- if oid == "CN" && value.casecmp(hostname) == 0
+- return true
++ if oid == "CN"
++ reg = Regexp.escape(value).gsub(/\\\*/, "[^.]+")
++ return true if /\A#{reg}\z/i =~ hostname
+ end
+ }
+ end