summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-03-13 14:18:07 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2015-03-17 07:00:14 +0200
commita3e68b4a558e1dd0ff61e497316cb6a32d3de410 (patch)
tree8bf4bc26afe98529219198fb58c55a8d9438f212 /mysql-test
parent5e6f12366abb02143ef57b6ff99285d81e3b3a36 (diff)
downloadmariadb-git-a3e68b4a558e1dd0ff61e497316cb6a32d3de410.tar.gz
MDEV-7772: SIGSEGV on my_aes_encrypt_cbc when -DWITH_SSL=bundled
Two problems: - Read/Write outside of buffer at memcpy() because of incorrect parameters . OPENSSL_assert(EVP_CIPHER_CTX_iv_length(&ctx.ctx) == iv_length); // ECB does not use IV, thus incorrect assertion Added: mysql-test/include/encryption_algorithms.combinations to run tests with methods cbc, ecb and ctr in those systems where they are available (see suite.pm).
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/encryption_algorithms.combinations8
-rw-r--r--mysql-test/include/encryption_algorithms.inc (renamed from mysql-test/include/have_openssl_ctr.inc)0
-rw-r--r--mysql-test/include/have_example_key_management_plugin.inc2
-rw-r--r--mysql-test/include/have_file_key_management_plugin.inc2
-rw-r--r--mysql-test/include/have_file_key_management_plugin.opt2
-rw-r--r--mysql-test/include/have_openssl_ctr.opt1
-rw-r--r--mysql-test/suite.pm2
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_encryption-page-compression.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_encryption.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_encryption.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_encryption_tables.test1
12 files changed, 15 insertions, 8 deletions
diff --git a/mysql-test/include/encryption_algorithms.combinations b/mysql-test/include/encryption_algorithms.combinations
new file mode 100644
index 00000000000..09c1e91e1cd
--- /dev/null
+++ b/mysql-test/include/encryption_algorithms.combinations
@@ -0,0 +1,8 @@
+[cbc]
+encryption-algorithm=aes_cbc
+
+[ecb]
+encryption-algorithm=aes_ecb
+
+[ctr]
+encryption-algorithm=aes_ctr
diff --git a/mysql-test/include/have_openssl_ctr.inc b/mysql-test/include/encryption_algorithms.inc
index 546cc1b9b93..546cc1b9b93 100644
--- a/mysql-test/include/have_openssl_ctr.inc
+++ b/mysql-test/include/encryption_algorithms.inc
diff --git a/mysql-test/include/have_example_key_management_plugin.inc b/mysql-test/include/have_example_key_management_plugin.inc
index 622e9a5286c..3bb4529b623 100644
--- a/mysql-test/include/have_example_key_management_plugin.inc
+++ b/mysql-test/include/have_example_key_management_plugin.inc
@@ -1,3 +1,5 @@
+-- source encryption_algorithms.inc
+
if (`select count(*) = 0 from information_schema.plugins
where plugin_name = 'example_key_management_plugin' and plugin_status='active'`)
{
diff --git a/mysql-test/include/have_file_key_management_plugin.inc b/mysql-test/include/have_file_key_management_plugin.inc
index fc682a77f35..3b3eb036ede 100644
--- a/mysql-test/include/have_file_key_management_plugin.inc
+++ b/mysql-test/include/have_file_key_management_plugin.inc
@@ -1,3 +1,5 @@
+-- source encryption_algorithms.inc
+
if (`select count(*) = 0 from information_schema.plugins
where plugin_name = 'file_key_management_plugin' and plugin_status='active'`)
{
diff --git a/mysql-test/include/have_file_key_management_plugin.opt b/mysql-test/include/have_file_key_management_plugin.opt
index 599847be1fe..5aa1ce18b00 100644
--- a/mysql-test/include/have_file_key_management_plugin.opt
+++ b/mysql-test/include/have_file_key_management_plugin.opt
@@ -1,4 +1,4 @@
--plugin-load-add=$FILE_KEY_MANAGEMENT_PLUGIN_SO
--loose-file-key-management-plugin
--loose-file-key-management-plugin-filename=$MYSQL_TEST_DIR/std_data/keys.txt
---encryption-algorithm=aes_cbc
+
diff --git a/mysql-test/include/have_openssl_ctr.opt b/mysql-test/include/have_openssl_ctr.opt
deleted file mode 100644
index a88a4224c9c..00000000000
--- a/mysql-test/include/have_openssl_ctr.opt
+++ /dev/null
@@ -1 +0,0 @@
---encryption-algorithm=aes_ctr
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 8101173b508..5eafd4e2ffd 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -66,7 +66,7 @@ sub skip_combinations {
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.1";
- $skip{'include/have_openssl_ctr.inc'} = 'no or too old openssl'
+ $skip{'include/encryption_algorithms.combinations'} = [ 'ctr' ]
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.1";
diff --git a/mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.opt b/mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.opt
index fe33453e8fa..f14c376c3b9 100644
--- a/mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.opt
+++ b/mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.opt
@@ -1,2 +1 @@
---encryption-algorithm=aes_cbc
--innodb-encrypt-log
diff --git a/mysql-test/suite/innodb/t/innodb_encryption-page-compression.test b/mysql-test/suite/innodb/t/innodb_encryption-page-compression.test
index ce59cf9547a..48a9a780e0d 100644
--- a/mysql-test/suite/innodb/t/innodb_encryption-page-compression.test
+++ b/mysql-test/suite/innodb/t/innodb_encryption-page-compression.test
@@ -1,5 +1,4 @@
-- source include/have_innodb.inc
--- source include/have_openssl_ctr.inc
-- source include/have_example_key_management_plugin.inc
# embedded does not support restart
diff --git a/mysql-test/suite/innodb/t/innodb_encryption.opt b/mysql-test/suite/innodb/t/innodb_encryption.opt
index 306e3f95660..f7f583d18ef 100644
--- a/mysql-test/suite/innodb/t/innodb_encryption.opt
+++ b/mysql-test/suite/innodb/t/innodb_encryption.opt
@@ -4,4 +4,4 @@
--innodb-encryption-rotate-key-age=15
--innodb-encryption-threads=4
--innodb-tablespaces-encryption
---encryption-algorithm=aes_ctr
+
diff --git a/mysql-test/suite/innodb/t/innodb_encryption.test b/mysql-test/suite/innodb/t/innodb_encryption.test
index ca3a68444a4..50aca2a7260 100644
--- a/mysql-test/suite/innodb/t/innodb_encryption.test
+++ b/mysql-test/suite/innodb/t/innodb_encryption.test
@@ -3,7 +3,6 @@
#
-- source include/have_innodb.inc
-- source include/have_example_key_management_plugin.inc
--- source include/have_openssl_ctr.inc
# embedded does not support restart
-- source include/not_embedded.inc
diff --git a/mysql-test/suite/innodb/t/innodb_encryption_tables.test b/mysql-test/suite/innodb/t/innodb_encryption_tables.test
index c630b7d57b0..d192a16ffd4 100644
--- a/mysql-test/suite/innodb/t/innodb_encryption_tables.test
+++ b/mysql-test/suite/innodb/t/innodb_encryption_tables.test
@@ -1,6 +1,5 @@
-- source include/have_innodb.inc
-- source include/have_example_key_management_plugin.inc
--- source include/have_openssl_ctr.inc
--source include/not_embedded.inc
--disable_query_log