1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/mysql-test/suite/encryption/t/filekeys_encfile_badfile.test
2026-08-06 20:49:23 +02:00

52 lines
1.6 KiB
Plaintext

#
# first test: no file
#
--let SEARCH_PATTERN=File 'bad.key' not found
--source filekeys_badtest.inc
#
# second test: wrong key
#
--let $datadir=`select @@datadir`
--write_file $datadir/bad.key
wrong key
EOF
--replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
--error 2
install soname 'file_key_management';
--let SEARCH_PATTERN=Cannot decrypt .*filekeys-data.enc. Wrong key
--source filekeys_badtest.inc
--remove_file $datadir/bad.key
#
# third test: too long key
#
--let $datadir=`select @@datadir`
--write_file $datadir/bad.key
secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
secretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecretsecret
EOF
--error 2
install soname 'file_key_management';
--let SEARCH_PATTERN=the filekey is too long
--source filekeys_badtest.inc
--remove_file $datadir/bad.key
--echo #
--echo # MDEV-40658 file_key_management crash on empty FILE: file
--echo #
--let $datadir=`select @@datadir`
--write_file $datadir/bad.key
EOF
--replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
--error 2
install soname 'file_key_management';
--let SEARCH_PATTERN=Cannot decrypt .*filekeys-data.enc. Wrong key
--source filekeys_badtest.inc
--remove_file $datadir/bad.key
--echo # End of 10.6 tests