Debian Codegraph @

mysql-test/suite/auth_sec/t/tlsv13.test

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