Project

General

Profile

Actions

Feature #4351

closed

Server Name Indication (SNI) for net/http

Added by akr (Akira Tanaka) over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-dev:43164]

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
Actions #1

Updated by naruse (Yui NARUSE) over 10 years ago

=begin
へぇ、こんなものが、知りませんでした。
わたしは賛成です、入れてしまっていいんじゃないでしょうか。
=end

Actions #2

Updated by akr (Akira Tanaka) over 10 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.


Actions

Also available in: Atom PDF