We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba85984 commit 398208fCopy full SHA for 398208f
src/MySQLdb/_mysql.c
@@ -531,10 +531,11 @@ _mysql_ConnectionObject_Initialize(
531
// See https://github.com/PyMySQL/mysqlclient/issues/474
532
// TODO: Does MariaDB supports PREFERRED and VERIFY_CA?
533
// We support only two levels for now.
534
- if (sslmode_num >= SSLMODE_REQUIRED) {
+ my_bool enforce_tls = 1;
535
+ if (ssl_mode_num >= SSLMODE_REQUIRED) {
536
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
537
}
- if (sslmode_num >= SSLMODE_VERIFY_CA) {
538
+ if (ssl_mode_num >= SSLMODE_VERIFY_CA) {
539
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (void *)&enforce_tls);
540
541
#endif
0 commit comments