diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-05-24 09:38:49 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-05-24 09:38:49 +0300 |
commit | 1864a8ea93aa1d1a540c83526a25df2ad0330763 (patch) | |
tree | f6d1ae8e9e696ea8537a395d061f697e5bccd4aa /plugin | |
parent | b01a9fd817d9d8e5941008d6981338eaa7369c83 (diff) | |
parent | 5c75ba9cadc7877e91d6b712f157ff5623c09c60 (diff) | |
download | mariadb-git-1864a8ea93aa1d1a540c83526a25df2ad0330763.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auth_ed25519/server_ed25519.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/auth_ed25519/server_ed25519.c b/plugin/auth_ed25519/server_ed25519.c index 81fc3e66755..e9678450042 100644 --- a/plugin/auth_ed25519/server_ed25519.c +++ b/plugin/auth_ed25519/server_ed25519.c @@ -41,17 +41,17 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) /* prepare the pk */ if (info->auth_string_length != PASSWORD_LEN) - return CR_AUTH_USER_CREDENTIALS; + return CR_ERROR; // bad password in the user table memcpy(pw, info->auth_string, PASSWORD_LEN); pw[PASSWORD_LEN]= '='; if (my_base64_decode(pw, PASSWORD_LEN_BUF, pk, NULL, 0) != CRYPTO_PUBLICKEYBYTES) - return CR_AUTH_USER_CREDENTIALS; + return CR_ERROR; // bad password in the user table info->password_used= PASSWORD_USED_YES; /* 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)) @@ -63,7 +63,7 @@ static int auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) memcpy(reply, pkt, CRYPTO_BYTES); if (crypto_sign_open(reply, CRYPTO_BYTES + NONCE_BYTES, pk)) - return CR_ERROR; + return CR_AUTH_USER_CREDENTIALS; // wrong password provided by the user return CR_OK; } |