config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/x/t/connection_tls_version.test

## Test cases for mysqlx plugin TLS versions

--source include/have_ssl.inc
--source ../include/have_performance_schema_threads.inc
--source ../include/xplugin_preamble.inc

call mtr.add_suppression("Plugin mysqlx reported: 'Error during SSL handshake for client connection \\([0-9]*\\)'");
call mtr.add_suppression("Plugin mysqlx reported: '[0-9]*: Error during SSL handshake'");

SET GLOBAL mysqlx_connect_timeout = 300;

CREATE USER user5_mysqlx@localhost
            IDENTIFIED WITH 'mysql_native_password' BY 'auth_string'
            REQUIRE SSL;

GRANT ALL ON *.* TO user5_mysqlx@localhost;

## Test starts here

--let $xtest_file= $MYSQL_TMP_DIR/connection_tls_version.tmp
--write_file $xtest_file
-->quiet
-->sql
SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
SHOW VARIABLES LIKE 'tls_version';
SHOW STATUS LIKE 'Mysqlx_ssl_version';
-->endsql
EOF

--exec $MYSQLXTEST -uroot --file=$xtest_file 2>&1

--let $XTESTPARAMS= -u user5_mysqlx --password='auth_string' --file=$xtest_file --ssl-cipher='DHE-RSA-AES256-SHA'
--let $ERROR1= /in main, line 0:ERROR: error:00000001:lib\(0\):func\(0\):reason\(1\)/Application terminated with expected error: protocol version mismatch/
--let $ERROR5= /in main, line 0:ERROR: error:00000005:lib\(0\):func\(0\):DH lib/Application terminated with expected error: socket layer receive error/ /in main, line 0:ERROR: error:00000001:lib\(0\):func\(0\):reason\(1\)/Application terminated with expected error: socket layer receive error/

--exec $MYSQLXTEST                                     $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1,TLSv1.2 $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1         $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.2         $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1.1,TLSv1.2       $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1                 $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1.1               $XTESTPARAMS 2>&1

--let $expected_error_msg= TLS version is invalid \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv3                 $XTESTPARAMS 2>&1


--let $restart_parameters = restart: --tls-version=TLSv1
--source ../include/restart_mysqld_and_wait_for_xplugin.inc

--exec $MYSQLXTEST                                     $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1,TLSv1.2 $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1         $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.2         $XTESTPARAMS 2>&1

--let $expected_error_extra= $ERROR1
--let $expected_error_msg= protocol version mismatch \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv1.1,TLSv1.2       $XTESTPARAMS 2>&1

--exec $MYSQLXTEST --tls-version=TLSv1                 $XTESTPARAMS 2>&1

--let $expected_error_extra= $ERROR1
--let $expected_error_msg= protocol version mismatch \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv1.1               $XTESTPARAMS 2>&1

--let $expected_error_msg= TLS version is invalid \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv3                 $XTESTPARAMS 2>&1


--let $restart_parameters = restart: --tls-version=TLSv1.1
--source ../include/restart_mysqld_and_wait_for_xplugin.inc

--exec $MYSQLXTEST                                     $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1,TLSv1.2 $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.1         $XTESTPARAMS 2>&1

--let $expected_error_extra= $ERROR5
--let $expected_error_msg= socket layer receive error \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv1,TLSv1.2         $XTESTPARAMS 2>&1
--exec $MYSQLXTEST --tls-version=TLSv1.1,TLSv1.2       $XTESTPARAMS 2>&1

--let $expected_error_extra= $ERROR5
--let $expected_error_msg= socket layer receive error \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv1                 $XTESTPARAMS 2>&1

--exec $MYSQLXTEST --tls-version=TLSv1.1               $XTESTPARAMS 2>&1

--let $expected_error_msg= TLS version is invalid \(code 2026\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST --tls-version=TLSv3                 $XTESTPARAMS 2>&1


# Postamble
--remove_file $xtest_file

DROP USER user5_mysqlx@localhost;
UNINSTALL PLUGIN mysqlx;



Man Man