ruby-changes:40706
From: nagachika <ko1@a...>
Date: Sun, 29 Nov 2015 17:02:07 +0900 (JST)
Subject: [ruby-changes:40706] nagachika:r52785 (ruby_2_2): merge revision(s) 52682: [Backport #11401] [Backport #11724]
nagachika 2015-11-29 17:01:54 +0900 (Sun, 29 Nov 2015) New Revision: 52785 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52785 Log: merge revision(s) 52682: [Backport #11401] [Backport #11724] * lib/net/http.rb: set hostname before call ossl_ssl_set_session. [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/lib/net/http.rb branches/ruby_2_2/version.h Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 52784) +++ ruby_2_2/ChangeLog (revision 52785) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Sun Nov 29 16:46:25 2015 SHIBATA Hiroshi <hsbt@r...> + + * lib/net/http.rb: set hostname before call ossl_ssl_set_session. + [Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek + Sun Nov 29 16:33:30 2015 Nobuyoshi Nakada <nobu@r...> * transcode.c (rb_econv_open0): rb_econv_t::source_encoding_name Index: ruby_2_2/lib/net/http.rb =================================================================== --- ruby_2_2/lib/net/http.rb (revision 52784) +++ ruby_2_2/lib/net/http.rb (revision 52785) @@ -914,12 +914,12 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/lib/net/http.rb#L914 @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= Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect } if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE s.post_connection_check(@address) Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 52784) +++ ruby_2_2/version.h (revision 52785) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.4" #define RUBY_RELEASE_DATE "2015-11-29" -#define RUBY_PATCHLEVEL 210 +#define RUBY_PATCHLEVEL 211 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 11 Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r52682 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/