diff options
author | Kazuki Yamaguchi <[email protected]> | 2020-07-10 13:56:38 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <[email protected]> | 2021-10-23 13:38:38 +0900 |
commit | d26e64e0eb68b9906a1d24971bef59be597b5924 (patch) | |
tree | 6aedf7832cc4e577ade6385aa28640e086b6297a /test | |
parent | 54047b6d0646b38cceaa2546c9ae57b5d9c4c988 (diff) |
[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
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_ssl.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 1a8ae3bd68..a93668d916 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -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) } } |