summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2005-10-04 15:43:55 +0200
committermsvensson@neptunus.(none) <>2005-10-04 15:43:55 +0200
commitcb96f195c8ec86236b1673adc0db5d32e08bd957 (patch)
tree26f143bdced58d5853d938349663652aaa3fcc4d /mysql-test/t
parent7de902fcefc0359bde4492b1ff804aefc5c9628b (diff)
downloadmariadb-git-cb96f195c8ec86236b1673adc0db5d32e08bd957.tar.gz
Improved testing of ssl and compression
- Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/compress.test19
-rw-r--r--mysql-test/t/openssl_1.test11
-rw-r--r--mysql-test/t/rpl_openssl.test2
-rw-r--r--mysql-test/t/ssl.test21
-rw-r--r--mysql-test/t/ssl_compress.test25
5 files changed, 76 insertions, 2 deletions
diff --git a/mysql-test/t/compress.test b/mysql-test/t/compress.test
new file mode 100644
index 00000000000..45b9ab9dd1e
--- /dev/null
+++ b/mysql-test/t/compress.test
@@ -0,0 +1,19 @@
+# Turn on compression between the client and server
+# and run a number of tests
+
+-- source include/have_compress.inc
+
+enable_compress;
+
+# Reconnect to turn compress on for
+# default connection
+disconnect default;
+connect (default,localhost,root,,);
+
+# Check compression turned on
+SHOW STATUS LIKE 'Compression';
+
+# Source select test case
+-- source t/select.test
+
+disable_compress;
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index e04c77ddf45..e9487425dd7 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -1,6 +1,6 @@
# 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_1.inc
+-- source include/have_openssl.inc
--disable_warnings
drop table if exists t1;
@@ -13,27 +13,36 @@ 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;
+enable_ssl;
connect (con1,localhost,ssl_user1,,);
connect (con2,localhost,ssl_user2,,);
connect (con3,localhost,ssl_user3,,);
connect (con4,localhost,ssl_user4,,);
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;
diff --git a/mysql-test/t/rpl_openssl.test b/mysql-test/t/rpl_openssl.test
index 3c151721d8e..e15eb9b179a 100644
--- a/mysql-test/t/rpl_openssl.test
+++ b/mysql-test/t/rpl_openssl.test
@@ -1,4 +1,4 @@
-source include/have_openssl_1.inc;
+source include/have_openssl.inc;
source include/master-slave.inc;
# We don't test all types of ssl auth params here since it's a bit hard
diff --git a/mysql-test/t/ssl.test b/mysql-test/t/ssl.test
new file mode 100644
index 00000000000..d13bec60c2b
--- /dev/null
+++ b/mysql-test/t/ssl.test
@@ -0,0 +1,21 @@
+# Turn on ssl between the client and server
+# and run a number of tests
+
+-- source include/have_openssl.inc
+
+enable_ssl;
+
+# Reconnect to turn ssl on for
+# default connection
+disconnect default;
+connect (default,localhost,root,,);
+
+# Check ssl turned on
+SHOW STATUS LIKE 'Ssl_cipher';
+
+# Source select test case
+-- source t/select.test
+
+disable_ssl;
+
+
diff --git a/mysql-test/t/ssl_compress.test b/mysql-test/t/ssl_compress.test
new file mode 100644
index 00000000000..4a0d3a254ff
--- /dev/null
+++ b/mysql-test/t/ssl_compress.test
@@ -0,0 +1,25 @@
+# Turn on compression between the client and server
+# and run a number of tests
+
+-- source include/have_openssl.inc
+-- source include/have_compress.inc
+
+enable_compress;
+enable_ssl;
+
+# Reconnect to turn ssl and compress on for
+# default connection
+disconnect default;
+connect (default,localhost,root,,);
+
+# Check ssl turned on
+SHOW STATUS LIKE 'Ssl_cipher';
+
+# Check compression turned on
+SHOW STATUS LIKE 'Compression';
+
+# Source select test case
+-- source t/select.test
+
+disable_compress;
+disable_ssl;