Skip to content

Commit b74e43b

Browse files
committed
test/openssl/test_ssl: skip test_fallback_scsv if necessary
[ This is a backport to the 2.1 branch. ] Run the test case only when the OpenSSL supports both TLS 1.1 and TLS 1.2. Note that the fallback SCSV mechanism is for TLS 1.2 or older and not for 1.3. Fixes: #336 (cherry picked from commit 6f2e6d7)
1 parent 6d587b9 commit b74e43b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/test_ssl.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,10 @@ def test_get_ephemeral_key
13771377
end
13781378

13791379
def test_fallback_scsv
1380+
supported = check_supported_protocol_versions
1381+
return unless supported.include?(OpenSSL::SSL::TLS1_1_VERSION) &&
1382+
supported.include?(OpenSSL::SSL::TLS1_2_VERSION)
1383+
13801384
pend "Fallback SCSV is not supported" unless \
13811385
OpenSSL::SSL::SSLContext.method_defined?(:enable_fallback_scsv)
13821386

0 commit comments

Comments
 (0)