summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-15 20:34:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-16 17:17:46 +0900
commit0b303c683007598a31f2cda3d512d981b278f8bd (patch)
tree09e9dc55c2486c3b2c18f98877482b14a8465645 /test/openssl
parenta6c447d4c5a3fd6bc76b2db65c4575ed849300c2 (diff)
downloadruby-0b303c683007598a31f2cda3d512d981b278f8bd.tar.gz
[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
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl.rb4
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)
}
}