You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
CONC-747: Change behaviour of MARIADB_TLS_DISABLE_PEER_VERIFICATION
Instead of skipping the verification during handshake, tls_allow_invalid_server_certificate will be unset during initialization of the connection handle if environment varible MARIADB_TLS_DISABLE_PEER_VERIFICATION was set. This will allow drivers and applications which don't have an API option to enable/disable peer server certificate verification to start without TLS/SSL.
This commit is contained in:
@@ -717,7 +717,6 @@ static int test_env_var(MYSQL *my __attribute__((unused)))
|
||||
{
|
||||
MYSQL *mysql= mysql_init(NULL);
|
||||
int rc= FAIL;
|
||||
unsigned int status;
|
||||
|
||||
#ifdef _WIN32
|
||||
_putenv_s("MARIADB_TLS_DISABLE_PEER_VERIFICATION", "1");
|
||||
@@ -733,14 +732,6 @@ static int test_env_var(MYSQL *my __attribute__((unused)))
|
||||
goto end;
|
||||
}
|
||||
|
||||
mariadb_get_infov(mysql, MARIADB_TLS_VERIFY_STATUS, &status);
|
||||
|
||||
if (status)
|
||||
{
|
||||
diag("expected status=0, since environment variable was set");
|
||||
goto end;
|
||||
}
|
||||
|
||||
rc= OK;
|
||||
|
||||
end:
|
||||
|
Reference in New Issue
Block a user