summaryrefslogtreecommitdiff
path: root/plugin/auth_ed25519
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-05-25 15:38:57 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-05-25 15:38:57 +0300
commit1dea7f79779d13695876b84ebecbf41c13d845cb (patch)
treefec8bf2607e69a9c6069001bb0de1f33fcae46ba /plugin/auth_ed25519
parent04de651725c3eeee8f216c55e2f8133e4547fadb (diff)
parent1864a8ea93aa1d1a540c83526a25df2ad0330763 (diff)
downloadmariadb-git-1dea7f79779d13695876b84ebecbf41c13d845cb.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'plugin/auth_ed25519')
-rw-r--r--plugin/auth_ed25519/server_ed25519.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/auth_ed25519/server_ed25519.c b/plugin/auth_ed25519/server_ed25519.c
index 6fec98c56fc..b789bd34ca4 100644
--- a/plugin/auth_ed25519/server_ed25519.c
+++ b/plugin/auth_ed25519/server_ed25519.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2017, MariaDB
+ Copyright (c) 2017, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
/* prepare random nonce */
if (my_random_bytes((unsigned char *)nonce, (int)sizeof(nonce)))
- return CR_AUTH_USER_CREDENTIALS;
+ return CR_ERROR; // eh? OpenSSL error
/* send it */
if (vio->write_packet(vio, reply + CRYPTO_BYTES, NONCE_BYTES))
@@ -55,7 +55,7 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
if (crypto_sign_open(reply, CRYPTO_BYTES + NONCE_BYTES,
(unsigned char*)info->auth_string))
- return CR_ERROR;
+ return CR_AUTH_USER_CREDENTIALS; // wrong password provided by the user
return CR_OK;
}