From f99da794a902692f7c00b5d4f747c4d94d3dbe0c Mon Sep 17 00:00:00 2001 From: Rob Ballou Date: Tue, 26 Jan 2016 14:09:34 -0700 Subject: [PATCH] Add strictSSL support --- src/NodeJS/Server.php | 28 ++++++++++++++++++++++++++++ src/NodeJS/Server/ZombieServer.php | 1 + 2 files changed, 29 insertions(+) diff --git a/src/NodeJS/Server.php b/src/NodeJS/Server.php index 94c9fb7..567df9b 100644 --- a/src/NodeJS/Server.php +++ b/src/NodeJS/Server.php @@ -60,6 +60,11 @@ abstract class Server */ protected $connection; + /** + * @var boolean + */ + protected $strictSSL; + /** * Constructor * @@ -233,6 +238,28 @@ public function getThreshold() return $this->threshold; } + /** + * Setter strict SSL + * + * @param boolean Whether to use strictSSL or not. + * + */ + public function setStrictSSL($strict = TRUE) + { + return $this->strictSSL = $strict; + } + + /** + * Getter strict SSL + * + * @return boolean Whether to use strictSSL or not. + * + */ + public function getStrictSSL() + { + return $this->strictSSL; + } + /** * Getter process object * @@ -423,6 +450,7 @@ protected function createTemporaryServer() '%host%' => $this->host, '%port%' => $this->port, '%modules_path%' => $this->nodeModulesPath, + '%strict_ssl%' => $this->strictSSL, )); $serverPath = tempnam(sys_get_temp_dir(), 'mink_nodejs_server'); diff --git a/src/NodeJS/Server/ZombieServer.php b/src/NodeJS/Server/ZombieServer.php index becc0ba..b3356a6 100644 --- a/src/NodeJS/Server/ZombieServer.php +++ b/src/NodeJS/Server/ZombieServer.php @@ -174,6 +174,7 @@ protected function getServerScript() stream.on('end', function () { if (browser == null) { browser = new zombie(); + browser.strictSSL = %strict_ssl%; // Clean up old pointers pointers = [];