Curl ssl证书 [英] Curl ssl certificates
问题描述
我一直关闭CURLOPT_SSL_VERIFYPEER在curl,但我真的想升级,我的php / centos / curl检查其证书。我有CENTOS 4.7 i686,PHP 5.2.16。
I have always turned off CURLOPT_SSL_VERIFYPEER in curl but I really want to upgrade wherever my php/centos/curl checks its certs at. I have CENTOS 4.7 i686, PHP 5.2.16.
我从stripe.com获得了一个不错的捆绑:
https://pastebin.com/raw.php?i=NZE2CuVJ
I got a nice bundle from stripe.com: https://pastebin.com/raw.php?i=NZE2CuVJ
如何安装到我甚至不需要使用
How do I "install" this to where I don't even need to use
curl_setopt($curl, CURLOPT_CAINFO, 'ca-certificates.crt');
推荐答案
将包保存为certificates.pem把它放在你的网络服务器上。然后使用
Save the bundle as "certificates.pem", and put it on your webserver. Then use
curl_setopt($curl, CURLOPT_CAINFO, '/link/to/directory/certificates.pem');
加载证书列表。
此外,请确保您连接到正确的域。 www.domain.com可能具有有效的证书,但domain.com可能不是。
to load the list of certificates. Also, make sure you're connecting to the right domain. www.domain.com might have a valid certificate, but domain.com might not.
详细信息:http://serverfault.com/questions/325120/curl-ssl-issue-with-rapidssl-certificates
这篇关于Curl ssl证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!