зеркало из https://github.com/github/ruby.git
* 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:
Родитель
7982996bd4
Коммит
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>
|
||||
|
||||
* file.c (w32_io_info): should return handle because FileIndex is
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче