Skip to content

Commit

Permalink
Enable SSL verification
Browse files Browse the repository at this point in the history
  • Loading branch information
ajimix committed May 11, 2018
1 parent 395fb5f commit e8d600a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion asana-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private function askAsana($action, $token)

// Decode compressed responses.
curl_setopt($curl, CURLOPT_ENCODING, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);

// Add client ID and client secret to the headers.
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
Expand Down
4 changes: 2 additions & 2 deletions asana.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,8 @@ private function askAsana($url, $data = null, $method = ASANA_METHOD_GET)
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->timeout);
curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // Don't verify SSL connection
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // "" ""
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); // Verify SSL connection
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); // "" ""

if (!empty($this->apiKey)) {
// Send with API key.
Expand Down

0 comments on commit e8d600a

Please sign in to comment.