From 3d5d677fc5b07f6276266a27204f597d668f2a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20GIGNON?= Date: Thu, 20 Nov 2014 15:23:01 +0100 Subject: [PATCH] Fixed an error when a certificate passphrase is required while it should not --- src/BeSimple/SoapClient/Curl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BeSimple/SoapClient/Curl.php b/src/BeSimple/SoapClient/Curl.php index e777fc8f..c0d2748e 100644 --- a/src/BeSimple/SoapClient/Curl.php +++ b/src/BeSimple/SoapClient/Curl.php @@ -105,7 +105,10 @@ public function __construct(array $options = array(), $followLocationMaxRedirect } if (isset($options['local_cert'])) { curl_setopt($this->ch, CURLOPT_SSLCERT, $options['local_cert']); - curl_setopt($this->ch, CURLOPT_SSLCERTPASSWD, $options['passphrase']); + + if (isset($options['passphrase'])) { + curl_setopt($this->ch, CURLOPT_SSLCERTPASSWD, $options['passphrase']); + } } if (isset($options['ca_info'])) { curl_setopt($this->ch, CURLOPT_CAINFO, $options['ca_info']);