Skip to content

Commit

Permalink
Update tests to be compatible with OpenSSL 3.2.0
Browse files Browse the repository at this point in the history
As of version 3.2.0, OpenSSL updated the error message in new versions
("openssl/openssl@81b741f68984"). Update the
tests and result files such that they are compatible with both original
and new error messages.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new
license. I am contributing on behalf of my employer Amazon Web Services,
Inc.
  • Loading branch information
DarrenZhang01 authored and LinuxJedi committed Apr 19, 2024
1 parent 4c34339 commit 7432a48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mysql-test/main/ssl_crl.result
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Variable_name Value
Ssl_version TLS_VERSION
# try logging in with a certificate in the server's --ssl-crl : should fail
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert certificate revoked
ERROR 2026 (HY000): TLS/SSL error: ssl/tls alert certificate revoked
4 changes: 2 additions & 2 deletions mysql-test/main/ssl_crl.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'"

--echo # try logging in with a certificate in the server's --ssl-crl : should fail
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
--replace_regex /ERROR 2013 \(HY000\): Lost connection to MySQL server at '.*', system error: [0-9]+/ERROR 2026 (HY000): TLS\/SSL error: sslv3 alert certificate revoked/
# OpenSSL 1.1.1a and later releases correctly rejects the certificate, but the error message is different
--replace_regex /(ERROR 2013 \(HY000\): Lost connection to MySQL server at '.*', system error: [0-9]+|ERROR 2026 \(HY000\): TLS\/SSL error: sslv3 alert certificate revoked)/ERROR 2026 (HY000): TLS\/SSL error: ssl\/tls alert certificate revoked/
--error 1
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1

0 comments on commit 7432a48

Please sign in to comment.