summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-07-30 11:37:16 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-08-03 18:56:14 +0900
commit85dc570893c2aaf25501fc780343508c44c6cd1d (patch)
tree0b4dd9c42c606c5c944d590e733defc8059be6e9 /test/net
parent20eb9e98b65352422fbb1197eb8699bfcb12d5ef (diff)
[ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+
https://github.com/ruby/net-http/commit/5ae9620fbc
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_https.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index 7660ef6..0ca3394 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -143,6 +143,14 @@ class TestNetHTTPS < Test::Unit::TestCase
http.use_ssl = true
http.cert_store = TEST_STORE
+ if OpenSSL::OPENSSL_LIBRARY_VERSION =~ /LibreSSL (\d+\.\d+)/ && $1.to_f > 3.19
+ # LibreSSL 3.2 defaults to TLSv1.3 in server and client, which doesn't currently
+ # support session resuse. Limiting the version to the TLSv1.2 stack allows
+ # this test to continue to work on LibreSSL 3.2+. LibreSSL may eventually
+ # support session reuse, but there are no current plans to do so.
+ http.ssl_version = :TLSv1
+ end
+
http.start
http.get("/")
http.finish