1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-31857 enable --ssl-verify-server-cert by default in the internal client

enable ssl + ssl_verify_server_cert in the internal client too

* fix replication tests to disable master_ssl_verify_server_cert
  because accounts are passwordless - except rpl.rpl_ssl1
* fix federated/federatedx/connect to disable SSL_VERIFY_SERVER_CERT
  because they cannot configure an ssl connection
* fix spider to disable ssl_verify_server_cert, if configuration
  says so, as spider _can_ configure an ssl connection
* memory leak in embedded test-connect
This commit is contained in:
Sergei Golubchik
2023-09-04 15:32:36 +02:00
parent e0c30390a7
commit abcd23add2
132 changed files with 276 additions and 259 deletions

View File

@@ -31,6 +31,8 @@ int main(int argc, char *argv[])
char *passwd;
char *porta;
unsigned int port;
int ret;
my_bool my_false= 0;
if (get_evar(&host, &porta, &user, &passwd))
{
@@ -60,19 +62,19 @@ int main(int argc, char *argv[])
return 1;
}
mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &my_false);
if (mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "utf8mb4") != 0) {
printf("mysql_options MYSQL_SET_CHARSET_NAME utf8mb4 failed: %s\n", mysql_error(mysql));
return 1;
}
if (!mysql_real_connect(mysql, host, user, passwd, NULL, port, NULL, CLIENT_FOUND_ROWS | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS)) {
if ((ret= !mysql_real_connect(mysql, host, user, passwd, NULL, port, NULL,
CLIENT_FOUND_ROWS | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS)))
printf("mysql_real_connect failed: %s\n", mysql_error(mysql));
return 1;
}
mysql_close(mysql);
mysql_thread_end();
mysql_library_end();
return 0;
return ret;
}