1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

CONC-366: Implementation of ed25519 authentication plugin

This commit is contained in:
Georg Richter
2018-12-02 16:58:30 +01:00
parent 7d5511c2e3
commit b87845b18d
69 changed files with 4921 additions and 1 deletions

View File

@@ -1598,8 +1598,43 @@ static int test_conc312(MYSQL *my)
return OK;
}
static int test_conc366(MYSQL *mysql)
{
char query[1024];
int rc;
MYSQL *my;
if (!is_mariadb)
{
diag("feature not supported by MySQL server");
return SKIP;
}
rc= mysql_query(mysql, "INSTALL SONAME 'auth_ed25519'");
if (rc)
{
diag("feature not supported, ed25519 plugin not available");
return SKIP;
}
sprintf(query, "CREATE OR REPLACE USER ede@%s IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'", this_host);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
my= mysql_init(NULL);
if (!mysql_real_connect(my, hostname, "ede", "foo", schema, port, socketname, 0))
{
diag("Error: %s", mysql_error(my));
return FAIL;
}
mysql_close(my);
return OK;
}
struct my_tests_st my_tests[] = {
{"test_conc366", test_conc366, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc312", test_conc312, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc351", test_conc351, TEST_CONNECTION_NONE, 0, NULL, NULL},
{"test_conc332", test_conc332, TEST_CONNECTION_NONE, 0, NULL, NULL},