diff options
author | Nishant Patel <91441876+nishantactivepipe@users.noreply.github.com> | 2022-02-05 14:29:38 +1100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-06 18:00:57 +0900 |
commit | cdbaac3f4b6349907fe744f5eafab982b45e53e2 (patch) | |
tree | 410c2731061dc82a485943871c87a9f79102b50d /test/open-uri | |
parent | 7f80ec47c3e6a1ac4f8c3e626d51ef6598d65b1c (diff) | |
download | ruby-cdbaac3f4b6349907fe744f5eafab982b45e53e2.tar.gz |
[ruby/open-uri] feat: allow option to pass version of SSL / TLS to use during communication. Allow versions are OpenSSL::SSL::SSLContext::METHODS
https://github.com/ruby/open-uri/commit/8729858517
Diffstat (limited to 'test/open-uri')
-rw-r--r-- | test/open-uri/test_ssl.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb index 4f645d83b9..a4e20b553f 100644 --- a/test/open-uri/test_ssl.rb +++ b/test/open-uri/test_ssl.rb @@ -107,6 +107,16 @@ class TestOpenURISSL } end + def test_validation_ssl_version + with_https {|srv, dr, url| + setup_validation(srv, dr) + URI.open("#{url}/data", :ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE, :ssl_version => :TLSv1_2) {|f| + assert_equal("200", f.status[0]) + assert_equal("ddd", f.read) + } + } + end + def with_https_proxy(proxy_log_tester=lambda {|proxy_log, proxy_access_log| assert_equal([], proxy_log) }) proxy_log = [] proxy_logger = WEBrick::Log.new(proxy_log, WEBrick::BasicLog::WARN) |