summaryrefslogtreecommitdiffstats
path: root/Auth
diff options
context:
space:
mode:
authorThanhHH <=>2014-01-09 18:03:41 +0700
committerThanhHH <=>2014-01-09 18:03:41 +0700
commitc1bf071f4ef11bbbd108364821031a0e2c6e4cfa (patch)
tree06a3f48fd398794c77167e681cf856409c377c97 /Auth
parent2b6c3ea36a4e113732cb559659e31b19622ebade (diff)
downloadphp-openid-c1bf071f4ef11bbbd108364821031a0e2c6e4cfa.zip
php-openid-c1bf071f4ef11bbbd108364821031a0e2c6e4cfa.tar.gz
php-openid-c1bf071f4ef11bbbd108364821031a0e2c6e4cfa.tar.bz2
Add Auth_OpenID_DISABLE_SSL_VERIFY opt to disable SSL verify
Diffstat (limited to 'Auth')
-rw-r--r--Auth/Yadis/ParanoidHTTPFetcher.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php
index 125029c..e326f1f 100644
--- a/Auth/Yadis/ParanoidHTTPFetcher.php
+++ b/Auth/Yadis/ParanoidHTTPFetcher.php
@@ -80,7 +80,7 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
if (!$this->canFetchURL($url)) {
return null;
}
-
+
$stop = time() + $this->timeout;
$off = $this->timeout;
@@ -90,11 +90,15 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
$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;
}