diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-15 20:34:21 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-06-13 14:01:57 +0900 |
| commit | f89101fa3610a7b977801d60b85bcc1ea2f6dee4 (patch) | |
| tree | a5d5f35d266774a2d813ed3c792e38b0a5b5d0c1 | |
| parent | 34da58bd17af10099e2a8f771d8c6aaa038b6cbe (diff) | |
[ruby/openssl] Relax error message check for OpenSSL 3.1
A tentative measures fo https://github.com/ruby/openssl/issues/606.
With OpenSSL 3.1.0, the error message at connection using "self-signed
certificate" seems to return `SSL_R_TLSV1_ALERT_UNKNOWN_CA` instead of
`SSL_R_CERTIFICATE_VERIFY_FAILED`.
https://github.com/ruby/openssl/commit/fc4629d246
| -rw-r--r-- | test/openssl/test_ssl.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index c80168f2ff..db76f1dc4c 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1046,9 +1046,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase start_server(ignore_listener_error: true) { |port| ctx = OpenSSL::SSL::SSLContext.new ctx.set_params - # 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/) { + assert_raise_with_message(OpenSSL::SSL::SSLError, /certificate/) { server_connect(port, ctx) } } |
