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

use ssl as libmysqlclient did

This commit is contained in:
Sergei Golubchik
2016-09-07 08:33:03 +02:00
parent 11a47c5c26
commit c87193af81

View File

@@ -973,7 +973,9 @@ mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert,
const char *ca, const char *capath, const char *cipher)
{
#ifdef HAVE_TLS
return (mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, key) |
char enable= 1;
return (mysql_optionsv(mysql, MYSQL_OPT_SSL_ENFORCE, &enable) |
mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, key) |
mysql_optionsv(mysql, MYSQL_OPT_SSL_CERT, cert) |
mysql_optionsv(mysql, MYSQL_OPT_SSL_CA, ca) |
mysql_optionsv(mysql, MYSQL_OPT_SSL_CAPATH, capath) |