From 6d4d7f5b8e0ddeafe6c5c995b304e29449bf84c5 Mon Sep 17 00:00:00 2001 From: Joel Margolis Date: Sat, 10 Oct 2015 14:52:00 -0400 Subject: [PATCH] fix path for ca_bundle in CasperAgent --- src/Casper-API-PHP/CasperAgent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Casper-API-PHP/CasperAgent.php b/src/Casper-API-PHP/CasperAgent.php index 3ac60d5..3c74f08 100644 --- a/src/Casper-API-PHP/CasperAgent.php +++ b/src/Casper-API-PHP/CasperAgent.php @@ -152,7 +152,7 @@ public function request($endpoint, $headers = array(), $params = array(), $post //If cURL doesn't have a bundle of root certificates handy, //we provide ours (see http://curl.haxx.se/docs/sslcerts.html). if(curl_errno($ch) == 60){ - curl_setopt($ch, CURLOPT_CAINFO, "../ca_bundle.crt"); + curl_setopt($ch, CURLOPT_CAINFO, __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."ca_bundle.crt"); $result = curl_exec($ch); } @@ -238,7 +238,7 @@ public function externalRequest($url, $headers = array(), $params = array(), $po //If cURL doesn't have a bundle of root certificates handy, //we provide ours (see http://curl.haxx.se/docs/sslcerts.html). if(curl_errno($ch) == 60){ - curl_setopt($ch, CURLOPT_CAINFO, "../ca_bundle.crt"); + curl_setopt($ch, CURLOPT_CAINFO, __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."ca_bundle.crt"); $result = curl_exec($ch); }