Skip to content

Commit

Permalink
Update Connection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
atishhamte authored Mar 29, 2019
1 parent 6d2aaae commit 9b36d7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/Database/MySQLi/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ public function connect($persistent = false)
//
// https://secure.php.net/ChangeLog-5.php#5.6.16
// https://bugs.php.net/bug.php?id=68344
elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT') && version_compare($this->mysqli->client_info, '5.6', '>='))
{
$this->mysqli->options(MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT, true);
$client_flags += MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
}
}

$client_flags |= MYSQLI_CLIENT_SSL;
$client_flags += MYSQLI_CLIENT_SSL;
$this->mysqli->ssl_set(
$ssl['key'] ?? null, $ssl['cert'] ?? null, $ssl['ca'] ?? null,
$ssl['capath'] ?? null, $ssl['cipher'] ?? null
Expand Down

0 comments on commit 9b36d7f

Please sign in to comment.