aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-02-17 08:14:47 +0000
committerKazuki Yamaguchi <k@rhe.jp>2020-02-17 08:14:47 +0000
commit6f2e6d7cf777b378b3b51c239abecb4e4af49824 (patch)
tree57e40c7702f23e8339e9f551044c99c2d32ff0b4
parent060764d398a2b096fd50fe344ab7c26255656c61 (diff)
downloadruby-openssl-ky/ssl-test-fix-fallback-scsv.tar.gz
test/openssl/test_ssl: skip test_fallback_scsv if necessaryky/ssl-test-fix-fallback-scsv
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: https://github.com/ruby/openssl/issues/336
-rw-r--r--test/openssl/test_ssl.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index eb5b77be..eae369a1 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -1419,6 +1419,10 @@ end
end
def test_fallback_scsv
+ supported = check_supported_protocol_versions
+ return unless supported.include?(OpenSSL::SSL::TLS1_1_VERSION) &&
+ supported.include?(OpenSSL::SSL::TLS1_2_VERSION)
+
pend "Fallback SCSV is not supported" unless \
OpenSSL::SSL::SSLContext.method_defined?(:enable_fallback_scsv)