matveyco / cex.io-api-php

CEX.IO API integration. PHP sources.
MIT License
21 stars 27 forks source link

api_call() returns false on "unknown" https certificate #9

Closed chris2286266 closed 10 years ago

chris2286266 commented 10 years ago

As a lot of PHP distributions don't have certificate handling (and so no keychain to verify the server certificate of https://cex.io/api), the call curl_exec($ch) in function post returns false. To switch off certificate validation use "curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);" in function post. Maybe this should be configurable?

birjj commented 10 years ago

This would lower the security, which is not a good idea for a platform such as CEX. In addition, it doesn't solve the underlying issue, but simply stops curl from reporting it.

A better option is to fix the issue by having users download an updated .pem file (such as this) and add it to their php.ini. I submitted a pull request with this info added to the readme.

matveyco commented 10 years ago

Check out latest fixes.