summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/http.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fa2b4adfbe..dd74062d78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 20 14:39:56 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * lib/net/http.rb: set hostname before call ossl_ssl_set_session.
+ [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek
+
Fri Nov 20 12:53:19 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* array.c: clarify docs for take_while/drop_while samples.
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 1021258128..d29a2d81cb 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -918,12 +918,12 @@ module Net #:nodoc:
@socket.write(buf)
HTTPResponse.read_new(@socket).value
end
+ # Server Name Indication (SNI) RFC 3546
+ s.hostname = @address if s.respond_to? :hostname=
if @ssl_session and
Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
s.session = @ssl_session if @ssl_session
end
- # Server Name Indication (SNI) RFC 3546
- s.hostname = @address if s.respond_to? :hostname=
if timeout = @open_timeout
while true
raise Net::OpenTimeout if timeout <= 0