summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-28 07:44:24 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-28 07:44:24 +0000
commitdd7f1cdfbd8215ee46c11175bfd2f4fd3569f34a (patch)
tree9f947cbbc3d0ff21012c918a34f6b202719e51e2
parent3f23ee7015448fbc33515dd8168c7b4d370c26e4 (diff)
merge revision(s) 48563: [Backport #10533]
* lib/net/http.rb: Do not attempt SSL session resumption when the session is expired. [Bug #10533] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@48636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/http.rb5
-rw-r--r--version.h2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cf823f31e..1aea7c0968 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 28 16:43:20 2014 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http.rb: Do not attempt SSL session resumption when the
+ session is expired. [Bug #10533]
+
Fri Nov 28 16:36:34 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (symbol_list): fix the node type of literal symbol list
diff --git a/lib/net/http.rb b/lib/net/http.rb
index a63be7f9a0..1e481ed366 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -912,7 +912,10 @@ module Net #:nodoc:
@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 }
diff --git a/version.h b/version.h
index c506ac8f5c..b1fc13278d 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2014-11-28"
-#define RUBY_PATCHLEVEL 605
+#define RUBY_PATCHLEVEL 606
#define RUBY_RELEASE_YEAR 2014
#define RUBY_RELEASE_MONTH 11