Curl ssl certificates(卷曲 ssl 证书)
问题描述
我一直在 curl 中关闭 CURLOPT_SSL_VERIFYPEER,但我真的想在我的 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.
更多信息:https://serverfault.com/questions/325120/curl-ssl-issue-with-rapidssl-certificates
这篇关于卷曲 ssl 证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:卷曲 ssl 证书
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
