Skip to content

Commit 1493455

Browse files
committed
Get existing tests into passing state
A handful of the SSL tests would not pass successfully without specifying the SSL version range in the test server.
1 parent 8d4b413 commit 1493455

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/octocatalog-diff/support/httparty/ssl_test_server.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def self.thread_main(tmpfile, options)
4444
ctx = OpenSSL::SSL::SSLContext.new
4545
ctx.cert = OpenSSL::X509::Certificate.new(options[:cert])
4646
ctx.key = OpenSSL::PKey::RSA.new(options[:rsa_key])
47+
if Gem::Version.new(OpenSSL::VERSION) >= Gem::Version.new('2.1.0')
48+
ctx.min_version = OpenSSL::SSL::SSL3_VERSION
49+
ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
50+
end
4751
ctx.verify_mode = if options[:client_verify]
4852
OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
4953
else

0 commit comments

Comments
 (0)