mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+
https://github.com/ruby/net-http/commit/5ae9620fbc
This commit is contained in:
parent
20eb9e98b6
commit
85dc570893
1 changed files with 8 additions and 0 deletions
|
@ -143,6 +143,14 @@ class TestNetHTTPS < Test::Unit::TestCase
|
||||||
http.use_ssl = true
|
http.use_ssl = true
|
||||||
http.cert_store = TEST_STORE
|
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.start
|
||||||
http.get("/")
|
http.get("/")
|
||||||
http.finish
|
http.finish
|
||||||
|
|
Loading…
Add table
Reference in a new issue