зеркало из https://github.com/github/ruby.git
[ruby/openssl] test/openssl/test_ssl: relax regex to match OpenSSL's error message
OpenSSL 3.0 slightly changed the error message for a certificate verification failure when an untrusted self-signed certificate is found in the chain. https://github.com/ruby/openssl/commit/b5a0a19850
This commit is contained in:
Родитель
54047b6d06
Коммит
d26e64e0eb
|
@ -1023,7 +1023,9 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
start_server(ignore_listener_error: true) { |port|
|
||||
ctx = OpenSSL::SSL::SSLContext.new
|
||||
ctx.set_params
|
||||
assert_raise_with_message(OpenSSL::SSL::SSLError, /self signed/) {
|
||||
# OpenSSL <= 1.1.0: "self signed certificate in certificate chain"
|
||||
# OpenSSL >= 3.0.0: "self-signed certificate in certificate chain"
|
||||
assert_raise_with_message(OpenSSL::SSL::SSLError, /self.signed/) {
|
||||
server_connect(port, ctx)
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче