mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/net/http/test_https.rb: The test logic was buggy
The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and `[SERVER_CERT]` after 1.1.1h.
This commit is contained in:
parent
1917afa34b
commit
0c611d7f4f
1 changed files with 4 additions and 4 deletions
|
@ -45,8 +45,8 @@ class TestNetHTTPS < Test::Unit::TestCase
|
|||
assert_equal($test_net_http_data, res.body)
|
||||
}
|
||||
# TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility
|
||||
certs.each do |cert|
|
||||
assert_include([SERVER_CERT.to_der, CA_CERT.to_der], cert.to_der)
|
||||
certs.zip([CA_CERT, SERVER_CERT][-certs.size..]) do |actual, expected|
|
||||
assert_equal(expected.to_der, actual.to_der)
|
||||
end
|
||||
rescue SystemCallError
|
||||
skip $!
|
||||
|
@ -66,8 +66,8 @@ class TestNetHTTPS < Test::Unit::TestCase
|
|||
assert_equal($test_net_http_data, res.body)
|
||||
}
|
||||
# TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility
|
||||
certs.each do |cert|
|
||||
assert_include([SERVER_CERT.to_der, CA_CERT.to_der], cert.to_der)
|
||||
certs.zip([CA_CERT, SERVER_CERT][-certs.size..]) do |actual, expected|
|
||||
assert_equal(expected.to_der, actual.to_der)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue