Error in cURL request: SSL certificate problem: unable to get local issuer certificate error with Socket adapter and CURLOPT_SSL_VERIFYPEER = false #81
I'm getting the above error:
1) With the Socket adapter
2) With the CURL adapter and CURLOPT_SSL_VERIFYPEER set to false
3) With both adapters configured with a CA chain certificate file
SSL certificate verification only happens with some SSL hosts, not others, even though they all share the same wildcard SSL certificate (*.unifiedcompliance.com). I just fixed this for the Guzzle client, but there seems to be no way to configure the Zend Http Client correctly. It seems to ignore almost all options I provide it.
I've also tried setting curl.cainfo, openssl.capath (or whatever the variables are in php.ini, I've tried setting them all and none have any effect on this). I'm running PHP 7.0.5-3+donate.sury.org~trusty+1 so maybe that has something to do with it because previous versions probably did not try to verify SSL certificates. The certificate is from GoDaddy unfortunately and I don't believe its chain/root CA are in the default Ubuntu 14.04 settings, but I could be wrong about that. CLI curl works with the file specified. Guzzle works through PHP. It's pretty much all working outsize of Zend Http Client.
Comment
User: @lucian303
Created On: 2016-04-29T16:44:19Z
Updated At: 2016-04-29T16:50:24Z
Body
I managed to get the Socket adapter to actually work, but trying to specify SSL settings and set it up correctly doesn't work for that also. All options are ignored. I can successfully curl calls from that system using the certificate chain. I just can't get Zend Http Client to do anything w/ SSL.
Unable to enable crypto on TCP connection authdev2.unifiedcompliance.com: make sure the "sslcafile" or "sslcapath" option are properly set for the environment.
Changing 'verify_peer' to false has no effect on this error. I really have no idea what to do at this point. Replacing the Zend Http Client with something else that supports SSL would be weeks of work.
@lucian303 we just merged #97 that allows the usage of sslcafile and sslcapath as options. This should fix or mitigate the issue. Can you try and let me know? Thanks!
This issue has been moved from the
zendframework
repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.htmlOriginal Issue: https://api.github.com/repos/zendframework/zendframework/issues/7698 User: @lucian303 Created On: 2016-04-28T23:38:21Z Updated At: 2016-06-28T12:48:26Z Body Error in cURL request: SSL certificate problem: unable to get local issuer certificate
I'm getting the above error: 1) With the Socket adapter 2) With the CURL adapter and CURLOPT_SSL_VERIFYPEER set to false 3) With both adapters configured with a CA chain certificate file
SSL certificate verification only happens with some SSL hosts, not others, even though they all share the same wildcard SSL certificate (*.unifiedcompliance.com). I just fixed this for the Guzzle client, but there seems to be no way to configure the Zend Http Client correctly. It seems to ignore almost all options I provide it.
My code:
This is what options should be and they should work, but ALL CURL options seem to be ignored by the Http Client:
I've also tried setting curl.cainfo, openssl.capath (or whatever the variables are in php.ini, I've tried setting them all and none have any effect on this). I'm running PHP 7.0.5-3+donate.sury.org~trusty+1 so maybe that has something to do with it because previous versions probably did not try to verify SSL certificates. The certificate is from GoDaddy unfortunately and I don't believe its chain/root CA are in the default Ubuntu 14.04 settings, but I could be wrong about that. CLI curl works with the file specified. Guzzle works through PHP. It's pretty much all working outsize of Zend Http Client.
Comment
User: @lucian303 Created On: 2016-04-29T16:44:19Z Updated At: 2016-04-29T16:50:24Z Body I managed to get the Socket adapter to actually work, but trying to specify SSL settings and set it up correctly doesn't work for that also. All options are ignored. I can successfully curl calls from that system using the certificate chain. I just can't get Zend Http Client to do anything w/ SSL.
leads to:
Changing 'verify_peer' to false has no effect on this error. I really have no idea what to do at this point. Replacing the Zend Http Client with something else that supports SSL would be weeks of work.