* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket#post_connection_chech):
treat wildcard character in commonName. [ruby-dev:28121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7982996bd4
commit
6f640b29cc
@ -1,3 +1,8 @@
|
|||||||
|
Tue Dec 27 08:22:15 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
|
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket#post_connection_chech):
|
||||||
|
treat wildcard character in commonName. [ruby-dev:28121]
|
||||||
|
|
||||||
Wed Dec 21 16:47:35 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Wed Dec 21 16:47:35 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* file.c (w32_io_info): should return handle because FileIndex is
|
* file.c (w32_io_info): should return handle because FileIndex is
|
||||||
|
@ -82,8 +82,9 @@ module OpenSSL
|
|||||||
}
|
}
|
||||||
if check_common_name
|
if check_common_name
|
||||||
cert.subject.to_a.each{|oid, value|
|
cert.subject.to_a.each{|oid, value|
|
||||||
if oid == "CN" && value.casecmp(hostname) == 0
|
if oid == "CN"
|
||||||
return true
|
reg = Regexp.escape(value).gsub(/\\\*/, "[^.]+")
|
||||||
|
return true if /\A#{reg}\z/i =~ hostname
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user