1
This commit is contained in:
+2
-8
@@ -77,16 +77,10 @@ class Curl extends ClientAbstracts
|
|||||||
*/
|
*/
|
||||||
private function curlHandlerSslSet(): void
|
private function curlHandlerSslSet(): void
|
||||||
{
|
{
|
||||||
if (!empty($this->ssl_key)) {
|
if (!empty($this->getSslKeyFile()) && file_exists($this->getSslKeyFile())) {
|
||||||
if (!file_exists($this->ssl_key)) {
|
|
||||||
throw new Exception('SSL protocol certificate not found.');
|
|
||||||
}
|
|
||||||
curl_setopt($this->client, CURLOPT_SSLKEY, $this->getSslKeyFile());
|
curl_setopt($this->client, CURLOPT_SSLKEY, $this->getSslKeyFile());
|
||||||
}
|
}
|
||||||
if (!empty($this->ssl_cert)) {
|
if (!empty($this->getSslCertFile()) && file_exists($this->getSslCertFile())) {
|
||||||
if (!!file_exists($this->ssl_cert)) {
|
|
||||||
throw new Exception('SSL protocol certificate not found.');
|
|
||||||
}
|
|
||||||
curl_setopt($this->client, CURLOPT_SSLCERT, $this->getSslCertFile());
|
curl_setopt($this->client, CURLOPT_SSLCERT, $this->getSslCertFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user