Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include certificates for validating SSL connections upon CURLE_SSL_CA…

…CERT errors.
  • Loading branch information...
commit fcf7893c1cde34eed797016617507b5e6176aae2 1 parent 40b4df8
chirags@google.com authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  src/io/apiCurlIO.php
View
3  src/io/apiCurlIO.php
@@ -108,14 +108,13 @@ public function makeRequest(apiHttpRequest $request) {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
curl_setopt($ch, CURLOPT_USERAGENT, $request->getUserAgent());
-
$respData = curl_exec($ch);
// Retry if certificates are missing.
if (curl_errno($ch) == CURLE_SSL_CACERT) {
error_log('SSL certificate problem, verify that the CA cert is OK.'
. ' Retrying with the CA cert bundle from google-api-php-client.');
- curl_setopt($ch, CURLOPT_CERTINFO, dirname(__FILE__) . '/cacerts.pem');
+ curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
$respData = curl_exec($ch);
}
Please sign in to comment.
Something went wrong with that request. Please try again.