gpt4 book ai didi

php - curl SSL 证书

转载 作者:太空宇宙 更新时间:2023-11-03 17:16:51 25 4
gpt4 key购买 nike

我一直在 curl 中关闭 CURLOPT_SSL_VERIFYPEER,但我真的想升级我的 php/centos/curl 检查其证书的地方。我有 CENTOS 4.7 i686,PHP 5.2.16。

我从 stripe.com 得到了一个不错的包: https://pastebin.com/raw.php?i=NZE2CuVJ

我如何将它“安装”到我什至不需要使用的地方

curl_setopt($curl, CURLOPT_CAINFO, 'ca-certificates.crt');

最佳答案

将 bundle 另存为“certificates.pem”,并将其放在您的网络服务器上。然后使用

curl_setopt($curl, CURLOPT_CAINFO, '/link/to/directory/certificates.pem');

加载证书列表。另外,请确保您连接到正确的域。 www.domain.com 可能有有效的证书,但 domain.com 可能没有。

更多信息:https://serverfault.com/questions/325120/curl-ssl-issue-with-rapidssl-certificates

关于php - curl SSL 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10102225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com