Skip to content

Commit fc4629d

Browse files
committed
Relax error message check for OpenSSL 3.1
A tentative measures fo #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`.
1 parent fbb24fd commit fc4629d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/openssl/test_ssl.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,9 +1046,7 @@ def test_connect_certificate_verify_failed_exception_message
10461046
start_server(ignore_listener_error: true) { |port|
10471047
ctx = OpenSSL::SSL::SSLContext.new
10481048
ctx.set_params
1049-
# OpenSSL <= 1.1.0: "self signed certificate in certificate chain"
1050-
# OpenSSL >= 3.0.0: "self-signed certificate in certificate chain"
1051-
assert_raise_with_message(OpenSSL::SSL::SSLError, /self.signed/) {
1049+
assert_raise_with_message(OpenSSL::SSL::SSLError, /certificate/) {
10521050
server_connect(port, ctx)
10531051
}
10541052
}

0 commit comments

Comments
 (0)