Skip to content

Commit

Permalink
Revert "Can't enable SSL with MariaDB driver library. (brianmario#1182)"
Browse files Browse the repository at this point in the history
This reverts commit 22fce00.
  • Loading branch information
vakuum authored and junaruga committed Apr 15, 2021
1 parent f76f726 commit 594b53a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/mysql2/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ static VALUE rb_set_ssl_mode_option(VALUE self, VALUE setting) {
#ifdef HAVE_CONST_MYSQL_OPT_SSL_ENFORCE
GET_CLIENT(self);
int val = NUM2INT( setting );
// Either MySQL 5.7.3 - 5.7.10, or Connector/C 6.1.3 - 6.1.x, or MariaDB 10.x
if ((version >= 50703 && version < 50711) || (version >= 60103 && version < 60200) || (version >= 100000 && version < 110000)) {
// Either MySQL 5.7.3 - 5.7.10, or Connector/C 6.1.3 - 6.1.x
if ((version >= 50703 && version < 50711) || (version >= 60103 && version < 60200)) {
if (val == SSL_MODE_DISABLED || val == SSL_MODE_REQUIRED) {
my_bool b = ( val == SSL_MODE_REQUIRED );
int result = mysql_options( wrapper->client, MYSQL_OPT_SSL_ENFORCE, &b );
Expand Down

0 comments on commit 594b53a

Please sign in to comment.