mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-31369 Disable TLS v1.0 and 1.1 for MariaDB
Remove TLSv1.1 from the default tls_version system variable. Output a warning if TLSv1.0 or TLSv1.1 are selected. Thanks Tingyao Nian for the feature request.
This commit is contained in:
@ -66,3 +66,5 @@ Variable_name Value
|
|||||||
Ssl_cipher_list AES128-SHA
|
Ssl_cipher_list AES128-SHA
|
||||||
disconnect ssl_con;
|
disconnect ssl_con;
|
||||||
connection default;
|
connection default;
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
FOUND 2 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
|
||||||
|
@ -101,3 +101,9 @@ SHOW STATUS LIKE 'Ssl_cipher';
|
|||||||
SHOW STATUS LIKE 'Ssl_cipher_list';
|
SHOW STATUS LIKE 'Ssl_cipher_list';
|
||||||
disconnect ssl_con;
|
disconnect ssl_con;
|
||||||
connection default;
|
connection default;
|
||||||
|
|
||||||
|
# MDEV-31369 Disable TLS v1.0 and 1.1 for MariaDB
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||||
|
--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
@ -12,3 +12,5 @@ Variable_name Value
|
|||||||
Ssl_version TLSv1.2
|
Ssl_version TLSv1.2
|
||||||
@@tls_version
|
@@tls_version
|
||||||
TLSv1.1,TLSv1.2
|
TLSv1.1,TLSv1.2
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
|
||||||
|
@ -22,3 +22,8 @@
|
|||||||
# finally list available protocols
|
# finally list available protocols
|
||||||
--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
|
--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
|
||||||
|
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||||
|
--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
|
@ -4,3 +4,5 @@ Variable_name Value
|
|||||||
Ssl_version TLSv1
|
Ssl_version TLSv1
|
||||||
@@tls_version
|
@@tls_version
|
||||||
TLSv1.0
|
TLSv1.0
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err
|
||||||
|
@ -10,3 +10,8 @@
|
|||||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
|
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
|
||||||
--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
|
--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
|
||||||
|
|
||||||
|
call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure");
|
||||||
|
--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||||
|
--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
|
@ -4500,6 +4500,8 @@ static int init_common_variables()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tls_version & (VIO_TLSv1_0 + VIO_TLSv1_1))
|
||||||
|
sql_print_warning("TLSv1.0 and TLSv1.1 are insecure and should not be used for tls_version");
|
||||||
|
|
||||||
#ifdef WITH_WSREP
|
#ifdef WITH_WSREP
|
||||||
/*
|
/*
|
||||||
|
@ -3623,7 +3623,7 @@ static Sys_var_set Sys_tls_version(
|
|||||||
"TLS protocol version for secure connections.",
|
"TLS protocol version for secure connections.",
|
||||||
READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG),
|
READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG),
|
||||||
tls_version_names,
|
tls_version_names,
|
||||||
DEFAULT(VIO_TLSv1_1 | VIO_TLSv1_2 | VIO_TLSv1_3));
|
DEFAULT(VIO_TLSv1_2 | VIO_TLSv1_3));
|
||||||
|
|
||||||
static Sys_var_mybool Sys_standard_compliant_cte(
|
static Sys_var_mybool Sys_standard_compliant_cte(
|
||||||
"standard_compliant_cte",
|
"standard_compliant_cte",
|
||||||
|
Reference in New Issue
Block a user