Skip to content

Commit 1ea6e9e

Browse files
committed
mysql: fix ssl enforcing for mysql < 8.0
1 parent 526b538 commit 1ea6e9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/db_mysql/my_con.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +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-
#ifdef LIBMARIADB
147+
#if (defined LIBMARIADB) || (MYSQL_VERSION_ID < 80000)
148148
mysql_options(ptr->con, MYSQL_OPT_SSL_ENFORCE, (void *)&use_tls);
149149
#else
150150
tls_opts = (use_tls?SSL_MODE_PREFERRED:SSL_MODE_DISABLED);

0 commit comments

Comments
 (0)