Skip to content

Commit

Permalink
Modified library to use secure cURL settings for SSL. Added ca-bundle…
Browse files Browse the repository at this point in the history
….crt, generated by mk-ca-bundle.pl script from cURL.
  • Loading branch information
nealpoole committed May 5, 2011
1 parent cdf15c1 commit de4d815
Show file tree
Hide file tree
Showing 2 changed files with 3,990 additions and 2 deletions.
5 changes: 3 additions & 2 deletions EpiOAuth.php
Expand Up @@ -170,8 +170,9 @@ protected function curlInit($url)
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
if(isset($_SERVER ['SERVER_ADDR']) && !empty($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] != '127.0.0.1')
curl_setopt($ch, CURLOPT_INTERFACE, $_SERVER ['SERVER_ADDR']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ca-bundle.crt');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
return $ch;
}

Expand Down

0 comments on commit de4d815

Please sign in to comment.