Skip to content

Commit 54f353c

Browse files
authored
Merge pull request #3 from jeremyevans/libressl-session-reuse
Fix SSL session reuse test with LibreSSL 3.2+
2 parents 6eda06d + 5ae9620 commit 54f353c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/net/http/test_https.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ def test_session_reuse
143143
http.use_ssl = true
144144
http.cert_store = TEST_STORE
145145

146+
if OpenSSL::OPENSSL_LIBRARY_VERSION =~ /LibreSSL (\d+\.\d+)/ && $1.to_f > 3.19
147+
# LibreSSL 3.2 defaults to TLSv1.3 in server and client, which doesn't currently
148+
# support session resuse. Limiting the version to the TLSv1.2 stack allows
149+
# this test to continue to work on LibreSSL 3.2+. LibreSSL may eventually
150+
# support session reuse, but there are no current plans to do so.
151+
http.ssl_version = :TLSv1
152+
end
153+
146154
http.start
147155
http.get("/")
148156
http.finish

0 commit comments

Comments
 (0)