Skip to content

Commit

Permalink
Set MySQL SSL parameters even if key is not set
Browse files Browse the repository at this point in the history
User might want to set any of the SSL parameters without needing to set
the key.

Fixes #12293

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jan 2, 2017
1 parent 6a0d330 commit d018add
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/dbi/DBIMysqli.php
Expand Up @@ -153,7 +153,12 @@ public function connect(
/* Optionally enable SSL */
if ($cfg['Server']['ssl']) {
$client_flags |= MYSQLI_CLIENT_SSL;
if (!empty($cfg['Server']['ssl_key'])) {
if (! is_null($cfg['Server']['ssl_key']) ||
! is_null($cfg['Server']['ssl_cert']) ||
! is_null($cfg['Server']['ssl_ca']) ||
! is_null($cfg['Server']['ssl_ca_paths']) ||
! is_null($cfg['Server']['ssl_ciphers'])
) {
mysqli_ssl_set(
$link,
$cfg['Server']['ssl_key'],
Expand Down

0 comments on commit d018add

Please sign in to comment.