summaryrefslogtreecommitdiffstats
path: root/Auth
diff options
context:
space:
mode:
authorWill Norris <will@willnorris.com>2012-01-02 13:52:41 -0800
committerWill Norris <will@willnorris.com>2012-01-02 13:52:41 -0800
commit3285ae0fa1af287dbee8b786d46bca44abbcd292 (patch)
treedea2e5dd085ec2ed09b77c78e782b4b24010374a /Auth
parent76d048fcab3584b3ec0224ec304437eb96e1486d (diff)
downloadphp-openid-3285ae0fa1af287dbee8b786d46bca44abbcd292.zip
php-openid-3285ae0fa1af287dbee8b786d46bca44abbcd292.tar.gz
php-openid-3285ae0fa1af287dbee8b786d46bca44abbcd292.tar.bz2
allow custom CA certs to be used to verify hosts
partially fixes #38
Diffstat (limited to 'Auth')
-rw-r--r--Auth/Yadis/ParanoidHTTPFetcher.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php
index 4005042..c44adfe 100644
--- a/Auth/Yadis/ParanoidHTTPFetcher.php
+++ b/Auth/Yadis/ParanoidHTTPFetcher.php
@@ -134,6 +134,9 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
if (Auth_OpenID_VERIFY_HOST) {
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ if (defined('Auth_OpenID_CAINFO')) {
+ curl_setopt($c, CURLOPT_CAINFO, Auth_OpenID_CAINFO);
+ }
} else {
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
}
@@ -215,6 +218,9 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
if (Auth_OpenID_VERIFY_HOST) {
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ if (defined('Auth_OpenID_CAINFO')) {
+ curl_setopt($c, CURLOPT_CAINFO, Auth_OpenID_CAINFO);
+ }
} else {
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
}