Fix test_session_reuse_but_expire for Net::HTTPS.
Test previously was skipped if OpenSSL version matched. However since upstream has a fix that allows the test to be executed successfully, it replaces the previous one. Instead of replacing Patch70, I have opted for adding a new one, as it's a different fix. Mainly it'll hopefully allow for easier cherry-picks between streams where this might be also needed. Fixes: ``` 1) Failure: TestNetHTTPS#test_session_reuse_but_expire [/builddir/build/BUILD/ruby-3.0.7/test/net/http/test_https.rb:196]: <false> expected but was <true>. ``` Related: RHEL-86130
This commit is contained in:
parent
30901750d9
commit
f77e9e6b4e
@ -1,28 +0,0 @@
|
|||||||
From 1816c142a4d66a75c23ccf6fd89a06cbe422e34f Mon Sep 17 00:00:00 2001
|
|
||||||
From: "NARUSE, Yui" <nurse@users.noreply.github.com>
|
|
||||||
Date: Sat, 3 Feb 2024 22:35:44 +0900
|
|
||||||
Subject: [PATCH] Fix test session reuse but expire (#9824)
|
|
||||||
|
|
||||||
* OpenSSL 3.2.1 30 Jan 2024 is also broken
|
|
||||||
|
|
||||||
Import 45064610725ddd81a5ea3775da35aa46985bc789 from ruby_3_3 branch
|
|
||||||
tentatively.
|
|
||||||
---
|
|
||||||
test/net/http/test_https.rb | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
|
|
||||||
index 7b97e39586..aef748dfa0 100644
|
|
||||||
--- a/test/net/http/test_https.rb
|
|
||||||
+++ b/test/net/http/test_https.rb
|
|
||||||
@@ -178,6 +178,7 @@ def test_session_reuse
|
|
||||||
def test_session_reuse_but_expire
|
|
||||||
# FIXME: The new_session_cb is known broken for clients in OpenSSL 1.1.0h.
|
|
||||||
skip if OpenSSL::OPENSSL_LIBRARY_VERSION =~ /OpenSSL 1.1.0h/
|
|
||||||
+ omit if OpenSSL::OPENSSL_LIBRARY_VERSION.include?('OpenSSL 3.2.')
|
|
||||||
|
|
||||||
http = Net::HTTP.new("localhost", config("port"))
|
|
||||||
http.use_ssl = true
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 960a0cdc544a226fed31c8988edb4fefe6990154 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MSP-Greg <Greg.mpls@gmail.com>
|
||||||
|
Date: Thu, 20 Jun 2024 19:33:06 -0500
|
||||||
|
Subject: [PATCH] [ruby/net-http] test_https.rb - fix
|
||||||
|
test_session_reuse_but_expire
|
||||||
|
|
||||||
|
https://github.com/ruby/net-http/commit/5544243c41
|
||||||
|
---
|
||||||
|
test/net/http/test_https.rb | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
|
||||||
|
index 7b97e39586..a2f17ce336 100644
|
||||||
|
--- a/test/net/http/test_https.rb
|
||||||
|
+++ b/test/net/http/test_https.rb
|
||||||
|
@@ -183,11 +183,11 @@ def test_session_reuse_but_expire
|
||||||
|
http.use_ssl = true
|
||||||
|
http.cert_store = TEST_STORE
|
||||||
|
|
||||||
|
- http.ssl_timeout = -1
|
||||||
|
+ http.ssl_timeout = 1
|
||||||
|
http.start
|
||||||
|
http.get("/")
|
||||||
|
http.finish
|
||||||
|
-
|
||||||
|
+ sleep 1.25
|
||||||
|
http.start
|
||||||
|
http.get("/")
|
||||||
|
|
@ -293,10 +293,6 @@ Patch68: ruby-3.3.0-openssl-3.2.0-fips-fix-pkey-dh-require-openssl.patch
|
|||||||
# https://github.com/ruby/ruby/commit/d3933fc753187a055a4904af82f5f3794c88c416
|
# https://github.com/ruby/ruby/commit/d3933fc753187a055a4904af82f5f3794c88c416
|
||||||
# https://bugs.ruby-lang.org/issues/20106
|
# https://bugs.ruby-lang.org/issues/20106
|
||||||
Patch69: ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch
|
Patch69: ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch
|
||||||
# Fix `TestNetHTTPS#test_session_reuse_but_expire` test failure cause by
|
|
||||||
# to OpenSSL 3.2
|
|
||||||
# https://github.com/ruby/ruby/commit/64b6a018a38f200c957fdbbe7d0cbe0e64781c9f
|
|
||||||
Patch70: ruby-3.3.1-Fix-test-session-reuse-but-expire.patch
|
|
||||||
# Tests not included, this Ruby release does not include REXML tests.
|
# Tests not included, this Ruby release does not include REXML tests.
|
||||||
# https://github.com/ruby/rexml/commit/ce59f2eb1aeb371fe1643414f06618dbe031979f
|
# https://github.com/ruby/rexml/commit/ce59f2eb1aeb371fe1643414f06618dbe031979f
|
||||||
Patch71: rubygem-rexml-3.3.9-Fix-ReDoS-CVE-2024-49761.patch
|
Patch71: rubygem-rexml-3.3.9-Fix-ReDoS-CVE-2024-49761.patch
|
||||||
@ -345,6 +341,9 @@ Patch78: rubygem-openssl-3.3.0-Only-CSR-version-1-encoded-as-0-is-allowed-by-PKI
|
|||||||
# Remove the assertions of the time string format without second.
|
# Remove the assertions of the time string format without second.
|
||||||
# https://github.com/ruby/openssl/pull/728
|
# https://github.com/ruby/openssl/pull/728
|
||||||
Patch79: rubygem-openssl-3.3.0-test_asn1.rb-Remove-the-assertions-of-the-time.patch
|
Patch79: rubygem-openssl-3.3.0-test_asn1.rb-Remove-the-assertions-of-the-time.patch
|
||||||
|
# Fix test_session_reuse_but_expire test failure for Net::HTTPS.
|
||||||
|
# https://github.com/ruby/ruby/commit/9f4b45fbf7981a57fd82436ebec8a50ec3d3fdc9
|
||||||
|
Patch80: ruby-3.4.0-ruby-net-http-test_https.rb-fix-test_session_reuse_but_expire.patch
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Suggests: rubypick
|
Suggests: rubypick
|
||||||
@ -818,7 +817,6 @@ rm -rf ext/fiddle/libffi*
|
|||||||
%patch67 -p1
|
%patch67 -p1
|
||||||
%patch68 -p1
|
%patch68 -p1
|
||||||
%patch69 -p1
|
%patch69 -p1
|
||||||
%patch70 -p1
|
|
||||||
%patch72 -p1
|
%patch72 -p1
|
||||||
%patch73 -p1
|
%patch73 -p1
|
||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
@ -827,6 +825,7 @@ rm -rf ext/fiddle/libffi*
|
|||||||
%patch77 -p1
|
%patch77 -p1
|
||||||
%patch78 -p1
|
%patch78 -p1
|
||||||
%patch79 -p1
|
%patch79 -p1
|
||||||
|
%patch80 -p1
|
||||||
|
|
||||||
# Instead of adjusting patch's directory, use the following form where
|
# Instead of adjusting patch's directory, use the following form where
|
||||||
# we first enter the correct directory, this allows more general application
|
# we first enter the correct directory, this allows more general application
|
||||||
|
Loading…
Reference in New Issue
Block a user