Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed disable SSL peer verification
[Issue #14](#14) suggests man in the middle attack possible, removed disabling SSL peer verification in cURL options (it wasn't needed anyway).
- Loading branch information
a31eca4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this commit (removing ssl_verifypeer) im getting error from curl:
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
a31eca4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the expected behavior ... the problem is that disabling peer verification is incredibly insecure. Generally the curl extension has a valid CA file for verifying peers built-in. However if you're using an older version of PHP this may not be sufficient.
You'll need to set the
CURLOPT_CAINFO
option and pass it an absolute file path pointing to a valid CA file. You can download thecacert.pem
file found here on the curl site. Perhaps the library could expose an optional setting to allow this sort of thing (or to disable verification -- not a good idea).Either way, disabling peer verification is extremely irresponsible. If you're transfers are failing now, it means everything you were doing before was vulnerable to MitM (Man in the Middle) attack.