Skip to content

Commit

Permalink
Merge pull request #103 from Kamislav/master
Browse files Browse the repository at this point in the history
Handle also CURLOPT_SSL_VERIFYHOST for strictSsl mode
  • Loading branch information
nategood committed Nov 19, 2013
2 parents a75197e + 2dfebf7 commit b5597ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,11 @@ public function _curlPrep()
}

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->strict_ssl);
// zero is safe for all curl versions
$verifyValue = $this->strict_ssl + 0;
//Support for value 1 removed in cURL 7.28.1 value 2 valid in all versions
if ($verifyValue > 0) $verifyValue++;
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $verifyValue);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// https://github.com/nategood/httpful/issues/84
Expand Down

0 comments on commit b5597ed

Please sign in to comment.