Feature #4351
closedServer Name Indication (SNI) for net/http
Description
=begin
ふと、SSL で name based vitual をやる話 (SNI - RFC 3546) はどうなったんだっけ、
と思って探したら、以下を見つけたので、net/http にも対処を
入れるのはどうですかね。
ssl - OpenSSL Server Name Indication support in Ruby - Stack Overflow
http://stackoverflow.com/questions/4685736/openssl-server-name-indication-support-in-ruby
対処を入れると、以下がエラーにならなくなります。
ruby -ropen-uri -e 'URI("https://gmail.com/.well-known/host-meta").read'
% svn diff --diff-cmd diff -x -u lib/net/http.rb
Index: lib/net/http.rb
--- lib/net/http.rb (revision 30734)
+++ lib/net/http.rb (working copy)
@@ -780,6 +780,7 @@
@socket.writeline ''
HTTPResponse.read_new(@socket).value
end
-
s.hostname = @address timeout(@open_timeout) { s.connect } if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE s.post_connection_check(@address)
--
[田中 哲][たなか あきら][Tanaka Akira]
=end
Updated by naruse (Yui NARUSE) almost 14 years ago
=begin
へぇ、こんなものが、知りませんでした。
わたしは賛成です、入れてしまっていいんじゃないでしょうか。
=end
Updated by akr (Akira Tanaka) almost 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r30816.
Akira, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/net/http.rb (Net::HTTP#connect): support SNI (Server Name
Indication) for HTTPS. [ruby-dev:43164]
http://stackoverflow.com/questions/4685736/openssl-server-name-indication-support-in-ruby
=end