summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-01-18 19:28:44 +0100
committerSergei Golubchik <serg@mariadb.org>2019-02-04 15:54:10 +0100
commit103a32fdd36843ec45c8ac1991abb1cf4cae1eb6 (patch)
tree70154a284a627625d54ee7c983d99c525f316696 /mysql-test
parentc94ec9fc6721f50fadb1d86d1d0bf004b39c69d2 (diff)
downloadmariadb-git-103a32fdd36843ec45c8ac1991abb1cf4cae1eb6.tar.gz
ed25519: better error message for an incorrect password hash
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result4
-rw-r--r--mysql-test/suite/plugins/t/auth_ed25519.test4
2 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 7b26530ed12..a7008b318ba 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -39,6 +39,10 @@ show grants for test1@localhost;
Grants for test1@localhost
GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
drop user test1@localhost;
+create user test1@localhost identified via ed25519 using 'foo';
+ERROR HY000: Password hash should be 43 characters long
+create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
+ERROR HY000: Password hash should be base64 encoded
create user test1@localhost identified via ed25519 using password('foo');
show grants for test1@localhost;
Grants for test1@localhost
diff --git a/mysql-test/suite/plugins/t/auth_ed25519.test b/mysql-test/suite/plugins/t/auth_ed25519.test
index b8a7b996f65..8e0bdd1d460 100644
--- a/mysql-test/suite/plugins/t/auth_ed25519.test
+++ b/mysql-test/suite/plugins/t/auth_ed25519.test
@@ -29,6 +29,10 @@ let $pwd=`select ed25519_password("secret")`;
eval create user test1@localhost identified via ed25519 using '$pwd';
show grants for test1@localhost;
drop user test1@localhost;
+--error ER_PASSWD_LENGTH
+create user test1@localhost identified via ed25519 using 'foo';
+--error ER_PASSWD_LENGTH
+create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
create user test1@localhost identified via ed25519 using password('foo');
show grants for test1@localhost;
select ed25519_password('foo');