From 91270b79ac186a650552a5456c427efcf908f2dd Mon Sep 17 00:00:00 2001 From: james Date: Wed, 11 Feb 2009 22:41:18 +0000 Subject: [PATCH] Don't verify the SSL certificate - temporary workaround for CURL's ca-cert bundle not properly authetnicating the YSF SSL cert. --- admin/award_download.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/award_download.php b/admin/award_download.php index a709520..374cc27 100644 --- a/admin/award_download.php +++ b/admin/award_download.php @@ -72,14 +72,16 @@ curl_setopt ($ch, CURLOPT_POSTFIELDSIZE, 0); curl_setopt ($ch, CURLOPT_TIMEOUT, 360); curl_setopt ($ch, CURLOPT_SSLVERSION, 3); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); $datastream = curl_exec ($ch); /// execute the curl session and return the output to a variable $datastream $datastream = str_replace(" standalone=\"yes\"","",$datastream); // echo "curl close
"; curl_close ($ch); /// close the curl session +// echo "sending [".nl2br(htmlspecialchars($xmldata))."]"; echo i18n("The Remote Server said:")."
"; - //echo notice($datastream); $response=xml_parsexml($datastream); + if(is_array($response)) { $keys=array_keys($response); if($keys[0]=="awardresponse") { @@ -298,6 +300,9 @@ echo mysql_error(); } else echo error(i18n("Invalid XML response. Expecting '%1', received '%2'",array("awardresponse",$keys[0]))); + } + else + echo error(i18n("Invalid response. Could not parse XML into Array: %1",array($response))); // echo "response=".print_r($datastream); echo "
";