Skip to content

Commit

Permalink
Fix for CONC-548: Symbol conflict with libsodium
Browse files Browse the repository at this point in the history
To avoid conflicts (and possible crashes) by duplicate symbols the function
crypto_sign was renamed to ma_crypto_sign.

Kudos to Peter van Dijk for reporting this issue.
  • Loading branch information
9EOR9 committed May 3, 2021
1 parent d60bdbe commit 180c543
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/auth/ed25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int auth_ed25519_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
return CR_SERVER_HANDSHAKE_ERR;

/* Sign nonce: the crypto_sign function is part of ref10 */
crypto_sign(signature, packet, NONCE_BYTES, (unsigned char*)mysql->passwd, strlen(mysql->passwd));
ma_crypto_sign(signature, packet, NONCE_BYTES, (unsigned char*)mysql->passwd, strlen(mysql->passwd));

/* send signature to server */
if (vio->write_packet(vio, signature, CRYPTO_BYTES))
Expand Down
2 changes: 1 addition & 1 deletion plugins/auth/ref10/crypto_sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ int crypto_sign_keypair(
unsigned char *pk,
unsigned char *pw, unsigned long long pwlen
);
int crypto_sign(
int ma_crypto_sign(
unsigned char *sm,
const unsigned char *m, unsigned long long mlen,
const unsigned char *pw, unsigned long long pwlen
Expand Down
2 changes: 1 addition & 1 deletion plugins/auth/ref10/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "ge.h"
#include "sc.h"

int crypto_sign(
int ma_crypto_sign(
unsigned char *sm,
const unsigned char *m,unsigned long long mlen,
const unsigned char *pw,unsigned long long pwlen
Expand Down

0 comments on commit 180c543

Please sign in to comment.