Skip to content

Commit

Permalink
Add Auth_OpenID_DISABLE_SSL_VERIFY opt to disable SSL verify
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanhHH committed Jan 9, 2014
1 parent 2b6c3ea commit c1bf071
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Auth/Yadis/ParanoidHTTPFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function get($url, $extra_headers = null)
if (!$this->canFetchURL($url)) {
return null;
}

$stop = time() + $this->timeout;
$off = $this->timeout;

Expand All @@ -90,11 +90,15 @@ function get($url, $extra_headers = null)
$this->reset();

$c = curl_init();

if (defined('Auth_OpenID_DISABLE_SSL_VERIFYPEER')
&& Auth_OpenID_DISABLE_SSL_VERIFYPEER === true) {
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
}

if ($c === false) {
Auth_OpenID::log(
"curl_init returned false; could not " .
"initialize for URL '%s'", $url);
"initialize for URL '%s'", $url);
return null;
}

Expand Down

0 comments on commit c1bf071

Please sign in to comment.