ruby-changes:36481
From: drbrain <ko1@a...>
Date: Tue, 25 Nov 2014 16:10:05 +0900 (JST)
Subject: [ruby-changes:36481] drbrain:r48563 (trunk): * lib/net/http.rb: Do not attempt SSL session resumption when the
drbrain 2014-11-25 16:09:48 +0900 (Tue, 25 Nov 2014) New Revision: 48563 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48563 Log: * lib/net/http.rb: Do not attempt SSL session resumption when the session is expired. [Bug #10533] Modified files: trunk/ChangeLog trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48562) +++ ChangeLog (revision 48563) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Nov 25 16:09:28 2014 Eric Hodel <drbrain@s...> + + * lib/net/http.rb: Do not attempt SSL session resumption when the + session is expired. [Bug #10533] + Tue Nov 25 15:59:46 2014 Eric Hodel <drbrain@s...> * lib/rake: Update to rake 10.4.0 Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 48562) +++ lib/net/http.rb (revision 48563) @@ -914,7 +914,10 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L914 @socket.write(buf) HTTPResponse.read_new(@socket).value end - s.session = @ssl_session if @ssl_session + if @ssl_session and + Time.now < @ssl_session.time + @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 } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/