ssl: fix tests using TLS 1.1 or older #867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #866
Commit aa7f03e broke
test_minmax_version
andtest_fallback_scsv
on systems using OpenSSL 1.1.1 with a system-wide configuration file that specifiesMinProtocol=TLSv1.2
.http://rubyci.s3.amazonaws.com/debian11/ruby-master/log/20250228T003003Z.fail.html.gz
http://rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20250228T003003Z.fail.html.gz
These test cases were already broken before the commit, but they were being skipped because
check_supported_protocol_versions
failed to detect TLS 1.1 support. To avoid affected by the configuration file, explicitly resetSSLContext#min_version
when TLS 1.1 or older is required.The test cases are also broken with OpenSSL 3.0 or later, but this is not currently visible because it still fails to detect TLS 1.1 support. This is caused by the default
SSLContext#security_level
value, as OpenSSL 3.0 changed TLS 1.1 to be disabled at level 1.