Skip to content

Commit a61bb18

Browse files
author
Phil Sturgeon
committed
Merge pull request philsturgeon#11 from ricick/master
Changing relative cert path to absolute
2 parents d4a70f3 + a1a84ae commit a61bb18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/Curl.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ public function ssl($verify_peer = TRUE, $verify_host = 2, $path_to_cert = NULL)
212212
{
213213
$this->option(CURLOPT_SSL_VERIFYPEER, TRUE);
214214
$this->option(CURLOPT_SSL_VERIFYHOST, $verify_host);
215-
$this->option(CURLOPT_CAINFO, $path_to_cert);
215+
if (isset($path_to_cert)) {
216+
$path_to_cert = realpath($path_to_cert);
217+
$this->option(CURLOPT_CAINFO, $path_to_cert);
218+
}
216219
}
217220
else
218221
{

0 commit comments

Comments
 (0)