diff --git a/src/Client.php b/src/Client.php index ab89f71..6771067 100644 --- a/src/Client.php +++ b/src/Client.php @@ -115,7 +115,7 @@ public function getApiVersion() public function &getConnector() { if (empty($this->connector)) { - $this->connector = new Connector(); + $this->connector = (new Connector())->setSslVerifyPeer($this->getSslVerifyPeer()); } return $this->connector; @@ -226,4 +226,28 @@ private function prepareAttachments($attachments = null) return $file_params; } + + + /** + * @var bool + */ + private $ssl_verify_peer = true; + + /** + * {@inheritdoc} + */ + public function getSslVerifyPeer() + { + return $this->ssl_verify_peer; + } + + /** + * {@inheritdoc} + */ + public function &setSslVerifyPeer($value) + { + $this->ssl_verify_peer = (bool) $value; + + return $this; + } } diff --git a/src/ClientInterface.php b/src/ClientInterface.php index d1fdcf6..d144147 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -11,7 +11,7 @@ /** * @package ActiveCollab\SDK */ -interface ClientInterface +interface ClientInterface extends VerifySslPeerInterface { const VERSION = '3.0.0';