Skip to content

Commit 4ef468c

Browse files
committed
brianmario#1182: Can't enable SSL with MariaDB driver library.
1 parent 346b4a4 commit 4ef468c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mysql2/client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ static VALUE rb_set_ssl_mode_option(VALUE self, VALUE setting) {
124124
#ifdef HAVE_CONST_MYSQL_OPT_SSL_ENFORCE
125125
GET_CLIENT(self);
126126
int val = NUM2INT( setting );
127-
// Either MySQL 5.7.3 - 5.7.10, or Connector/C 6.1.3 - 6.1.x
128-
if ((version >= 50703 && version < 50711) || (version >= 60103 && version < 60200)) {
127+
// Either MySQL 5.7.3 - 5.7.10, or Connector/C 6.1.3 - 6.1.x, or MariaDB 10.x
128+
if ((version >= 50703 && version < 50711) || (version >= 60103 && version < 60200) || (version >= 100000 && version < 110000)) {
129129
if (val == SSL_MODE_DISABLED || val == SSL_MODE_REQUIRED) {
130130
my_bool b = ( val == SSL_MODE_REQUIRED );
131131
int result = mysql_options( wrapper->client, MYSQL_OPT_SSL_ENFORCE, &b );

0 commit comments

Comments
 (0)