| 1 |
# Want to skip this test from daily Valgrind execution |
| 2 |
--source include/no_valgrind_without_big.inc |
| 3 |
|
| 4 |
# Save the initial number of concurrent sessions |
| 5 |
--source include/count_sessions.inc |
| 6 |
|
| 7 |
--echo # |
| 8 |
--echo # WL#8196 TLSv1.2 support with TLSv1/TLSv1.1 client |
| 9 |
--echo # |
| 10 |
|
| 11 |
--disable_query_log |
| 12 |
call mtr.add_suppression("Failed to set up SSL because of"); |
| 13 |
call mtr.add_suppression("Plugin mysqlx reported: 'Failed at SSL configuration"); |
| 14 |
--enable_query_log |
| 15 |
|
| 16 |
# We let our server restart attempts write to the file $error_log. |
| 17 |
let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err; |
| 18 |
|
| 19 |
--error 0,1 |
| 20 |
--remove_file $error_log |
| 21 |
|
| 22 |
let $MYSQLD_DATADIR= `SELECT @@datadir`; |
| 23 |
let $MYSQL_SOCKET= `SELECT @@socket`; |
| 24 |
let $MYSQL_PORT= `SELECT @@port`; |
| 25 |
|
| 26 |
--echo #T1: Setting TLS version TLSv1.1 from the client should fail to connect |
| 27 |
--error 1 |
| 28 |
--exec $MYSQL --host=127.0.0.1 -P $MASTER_MYPORT --tls-version=TLSv1.1 -e "SHOW STATUS like 'Ssl_version'" |
| 29 |
|
| 30 |
--echo #T2: Setting TLS version TLSv1 from the client should fail to connect |
| 31 |
--error 1 |
| 32 |
--exec $MYSQL --host=127.0.0.1 -P $MASTER_MYPORT --tls-version=TLSv1 -e "SHOW STATUS like 'Ssl_version'" |
| 33 |
|
| 34 |
--echo #T3: Setting TLS version TLSv1, TLSv1.1 from the client should fail to connect |
| 35 |
--error 1 |
| 36 |
--exec $MYSQL --host=127.0.0.1 -P $MASTER_MYPORT --tls-version=TLSv1,TLSv1.1 -e "SHOW STATUS like 'Ssl_version'" |
| 37 |
|
| 38 |
--exec echo "restart:--tls-version=TLSv1.2 --ssl-cipher=ECDHE-RSA-AES128-GCM-SHA256 " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 39 |
--enable_reconnect |
| 40 |
--source include/wait_until_connected_again.inc |
| 41 |
|
| 42 |
--echo #T4: Setting TLS version1.2 in the server and from client giving TLSv1.1, connection should fail |
| 43 |
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 44 |
--shutdown_server |
| 45 |
--source include/wait_until_disconnected.inc |
| 46 |
|
| 47 |
--exec echo "restart:--tls-version=TLSv1.2 " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 48 |
--enable_reconnect |
| 49 |
--source include/wait_until_connected_again.inc |
| 50 |
|
| 51 |
--error 1 |
| 52 |
--exec $MYSQL --ssl-mode=REQUIRED --host=127.0.0.1 -P $MASTER_MYPORT --tls-version=TLSv1.1 -e "SHOW STATUS like 'Ssl_version'" |
| 53 |
|
| 54 |
--echo # restart server using restart |
| 55 |
--echo Restart server and provide ssl-cipher at server startup |
| 56 |
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 57 |
--shutdown_server |
| 58 |
--source include/wait_until_disconnected.inc |
| 59 |
|
| 60 |
--exec echo "restart: " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 61 |
--enable_reconnect |
| 62 |
--source include/wait_until_connected_again.inc |
| 63 |
|