Skip to content

Commit 60cf3f9

Browse files
committed
WL#15983: Stop using mysql_ssl_set api
The mysql_ssl_set() C API function is being deprecated by the server. It's used for establishing encrypted connections using SSL, and it's a convenience function equivalent to using mysql_options() calls. This worklog replaces the mysql_ssl_set() C API function call by mysql_options() for setting the TLS options. Change-Id: I10af136839c00236e3d988fcf785864410c45d10
1 parent 1fa7ae6 commit 60cf3f9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Full release notes:
1111
v8.3.0
1212
======
1313

14+
- WL#15983: Stop using mysql_ssl_set api
1415
- WL#15982: Remove use of mysql_shutdown
1516

1617
v8.2.0

src/mysql_capi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,9 @@ MySQL_connect(MySQL *self, PyObject *args, PyObject *kwds)
12591259
else {
12601260
ssl_ca = NULL;
12611261
}
1262-
mysql_ssl_set(&self->session, ssl_key, ssl_cert, ssl_ca, NULL, NULL);
1262+
mysql_options(&self->session, MYSQL_OPT_SSL_KEY, ssl_key);
1263+
mysql_options(&self->session, MYSQL_OPT_SSL_CERT, ssl_cert);
1264+
mysql_options(&self->session, MYSQL_OPT_SSL_CA, ssl_ca);
12631265
if (tls_versions != NULL) {
12641266
mysql_options(&self->session, MYSQL_OPT_TLS_VERSION, tls_versions);
12651267
}

0 commit comments

Comments
 (0)