Cleanly apply patches.

This commit is contained in:
Vít Ondruch 2018-08-29 18:31:47 +02:00
parent ec97a0708b
commit b19096d798
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ index c1205563..b4393e68 100644
def test_new_break def test_new_break
assert_nil(OpenSSL::PKey::RSA.new(1024) { break }) assert_nil(OpenSSL::PKey::RSA.new(1024) { break })
assert_raise(RuntimeError) do assert_raise(RuntimeError) do
@@ -256,7 +263,7 @@ def test_pem_passwd @@ -289,7 +296,7 @@ def test_pem_passwd
end end
def test_dup def test_dup

View File

@ -44,7 +44,7 @@ diff --git a/lib/net/http.rb b/lib/net/http.rb
index 281b15cedff0..683a884f5dbe 100644 index 281b15cedff0..683a884f5dbe 100644
--- a/lib/net/http.rb --- a/lib/net/http.rb
+++ b/lib/net/http.rb +++ b/lib/net/http.rb
@@ -983,6 +983,10 @@ def connect @@ -969,6 +969,10 @@ def connect
end end
@ssl_context = OpenSSL::SSL::SSLContext.new @ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params(ssl_parameters) @ssl_context.set_params(ssl_parameters)
@ -55,7 +55,7 @@ index 281b15cedff0..683a884f5dbe 100644
D "starting SSL for #{conn_address}:#{conn_port}..." D "starting SSL for #{conn_address}:#{conn_port}..."
s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context) s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
s.sync_close = true s.sync_close = true
@@ -990,13 +994,12 @@ def connect @@ -976,13 +980,12 @@ def connect
s.hostname = @address if s.respond_to? :hostname= s.hostname = @address if s.respond_to? :hostname=
if @ssl_session and if @ssl_session and
Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout