Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
SSL test fixes
* fix CRL tests to work * regenerate certificates to be at least 2048 bit (fixes buster and rhel8 in buildbot) * update generate-ssl-cert.sh to generate crl files * make all SSL tests to use certificates generated in generate-ssl-cert.sh, remove unused certificates
- Loading branch information
Showing
58 changed files
with
732 additions
and
1,265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| -- source include/have_ssl_communication.inc | ||
| let $crllen=`select length(trim(coalesce(@@ssl_crl, ''))) + length(trim(coalesce(@@ssl_crlpath, '')))`; | ||
| if (!$crllen) | ||
| { | ||
| if (`SELECT count(*) = 0 FROM information_schema.GLOBAL_VARIABLES WHERE | ||
| VARIABLE_NAME = 'have_openssl' AND VARIABLE_VALUE = 'YES'`){ | ||
| skip Needs OpenSSL; | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [file] | ||
| ssl-crl=$MYSQL_TEST_DIR/std_data/client-cert.crl | ||
|
|
||
| [path] | ||
| ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,5 @@ | ||
| # test --crl for the client : should connect | ||
| # try logging in with a certificate not in the server's --ssl-crl : should succeed | ||
| Variable_name Value | ||
| have_openssl YES | ||
| have_ssl YES | ||
| ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem | ||
| ssl_capath | ||
| ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem | ||
| ssl_cipher | ||
| ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl | ||
| ssl_crlpath | ||
| ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem | ||
| # test --crlpath for the client : should connect | ||
| Variable_name Value | ||
| have_openssl YES | ||
| have_ssl YES | ||
| ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem | ||
| ssl_capath | ||
| ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem | ||
| ssl_cipher | ||
| ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl | ||
| ssl_crlpath | ||
| ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem | ||
| Ssl_version TLS_VERSION | ||
| # try logging in with a certificate in the server's --ssl-crl : should fail | ||
| ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| # Test clients with and without CRL lists | ||
| ############ Test mysql ############## | ||
| # Test mysql connecting to a server with a certificate revoked by -crl | ||
| ERROR 2026 (HY000): SSL connection error: certificate revoked | ||
| # Test mysql connecting to a server with a certificate revoked by -crlpath | ||
| ERROR 2026 (HY000): SSL connection error: certificate revoked | ||
| ############ Test mysqladmin ############## | ||
| # Test mysqladmin connecting to a server with a certificate revoked by -crl | ||
| mysqladmin: connect to server at 'localhost' failed | ||
| error: 'SSL connection error: certificate revoked' | ||
| # Test mysqladmin connecting to a server with a certificate revoked by -crlpath | ||
| mysqladmin: connect to server at 'localhost' failed | ||
| error: 'SSL connection error: certificate revoked' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.