mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
2bb0501d65
- Updated after review client/mysqltest.c: Updated after review. Fix "connect" command to take SSL and/or COMPRESS as options instead of enable/disable_ssl and enable/disable_compress Commented do_connect, added test cases etc. Fix safe_get_param to make it possible to call it once for every argument without having any checks inbetween. Make a copy for query->first_argument since safe_get_param will modify query string. Now connect works inside a while loop as well. mysql-test/mysql-test-run.pl: Updated after review mysql-test/r/connect.result: Enable test that was previolsy disabled because of "no error handling" in connect mysql-test/r/mysqltest.result: Added tests for "connect" mysql-test/t/compress.test: Updated after review, use the option argument to connect mysql-test/t/connect.test: Enable test that was previolsy disabled because of "no error handling" in connect Now it's possible to use "--error" before connect, so let's use it. mysql-test/t/information_schema.test: Connection user4 was already used mysql-test/t/myisam.test: Disconnect con1 so the name can be reused mysql-test/t/mysqltest.test: Added tests for "connect" mysql-test/t/openssl_1.test: Updated after review, use the option argument to connect mysql-test/t/sp-security.test: Disconnect user1 connection so the name can be reused mysql-test/t/ssl.test: Updated after review, use the option argument to connect mysql-test/t/ssl_compress.test: Updated after review, use the option argument to connect sql/mysqld.cc: Updated after review, Compression variable is always available sql/sql_show.cc: Updated after review, Compression variable is always available sql/structs.h: Updated after review, Compression variable is always available
56 lines
1.7 KiB
Text
56 lines
1.7 KiB
Text
# We test openssl. Result set is optimized to be compiled with --with-openssl.
|
|
# Use mysql-test-run with --with-openssl option.
|
|
-- source include/have_openssl.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
create table t1(f1 int);
|
|
insert into t1 values (5);
|
|
|
|
grant select on test.* to ssl_user1@localhost require SSL;
|
|
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
|
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com";
|
|
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/L=Uppsala/O=MySQL AB/CN=MySQL Client/Email=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/L=Uppsala/O=MySQL AB/CN=Abstract MySQL Developer/Email=abstract.mysql.developer@mysql.com";
|
|
flush privileges;
|
|
|
|
connect (con1,localhost,ssl_user1,,,,,SSL);
|
|
connect (con2,localhost,ssl_user2,,,,,SSL);
|
|
connect (con3,localhost,ssl_user3,,,,,SSL);
|
|
connect (con4,localhost,ssl_user4,,,,,SSL);
|
|
|
|
connection con1;
|
|
# Check ssl turned on
|
|
SHOW STATUS LIKE 'Ssl_cipher';
|
|
select * from t1;
|
|
--error 1142
|
|
delete from t1;
|
|
|
|
connection con2;
|
|
# Check ssl turned on
|
|
SHOW STATUS LIKE 'Ssl_cipher';
|
|
select * from t1;
|
|
--error 1142
|
|
delete from t1;
|
|
|
|
connection con3;
|
|
# Check ssl turned on
|
|
SHOW STATUS LIKE 'Ssl_cipher';
|
|
select * from t1;
|
|
--error 1142
|
|
delete from t1;
|
|
|
|
connection con4;
|
|
# Check ssl turned on
|
|
SHOW STATUS LIKE 'Ssl_cipher';
|
|
select * from t1;
|
|
--error 1142
|
|
delete from t1;
|
|
|
|
connection default;
|
|
delete from mysql.user where user='ssl_user%';
|
|
delete from mysql.db where user='ssl_user%';
|
|
flush privileges;
|
|
drop table t1;
|
|
|
|
# End of 4.1 tests
|