Skip to content

Commit 1af307e

Browse files
committed
mysql: if SSL is not used, do not enforce it
1 parent 57aef3b commit 1af307e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/db_mysql/my_con.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ int db_mysql_connect(struct my_con* ptr)
144144
(tls_opts & MY_CON_TLS_CA_DIR) ? ptr->tls_dom->ca_directory:NULL,
145145
(tls_opts & MY_CON_TLS_CIPHERS) ? ptr->tls_dom->ciphers_list:NULL);
146146
}
147+
mysql_options(ptr->con, MYSQL_OPT_SSL_ENFORCE, (void *)&use_tls);
147148

148149
/* set connect, read and write timeout, the value counts three times */
149150
mysql_options(ptr->con, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&db_mysql_timeout_interval);

0 commit comments

Comments
 (0)