From 23922061b5b83f741ce9c8af886e4baeb2c63da6 Mon Sep 17 00:00:00 2001 From: Richard Fath Date: Tue, 6 Aug 2019 22:26:49 +0200 Subject: [PATCH] Update PdoDriver.php --- src/Pdo/PdoDriver.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Pdo/PdoDriver.php b/src/Pdo/PdoDriver.php index c698de07e..d24e664ee 100644 --- a/src/Pdo/PdoDriver.php +++ b/src/Pdo/PdoDriver.php @@ -274,7 +274,7 @@ public function connect() } else { - $format .= ';sslmode=required'; + $format .= ';sslmode=require'; } $sslKeysMapping = [ @@ -286,11 +286,11 @@ public function connect() ]; // If customised, add cipher suite, ca file path, ca path, private key file path and certificate file path to PDO driver options. - foreach (['cipher', 'ca', 'capath', 'key', 'cert'] as $key => $value) + foreach ($sslKeysMapping as $key => $value) { - if ($sslKeysMapping[$key] !== null && $this->options['ssl'][$value] !== null) + if ($value !== null && $this->options['ssl'][$key] !== null) { - $format .= ';' . $sslKeysMapping[$key] . '=' . $this->options['ssl'][$value]; + $format .= ';' . $value . '=' . $this->options['ssl'][$key]; } } }