[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:
Kazuki Yamaguchi 2020-07-10 13:56:38 +09:00
Родитель 54047b6d06
Коммит d26e64e0eb
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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)
}
}