【问题标题】:cURL not working for HTTPS (Error: 77)cURL 不适用于 HTTPS(错误:77)
【发布时间】:2017-02-15 10:45:35
【问题描述】:

PHP curl 不适用于 Amazon Linux 上的 https 请求。这是我卷曲 https url 时得到的结果:

curl -v https://google.com
Rebuilt URL to: https://google.com/
Trying 172.217.3.174...
Connected to google.com (172.217.3.174) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
Closing connection 0
curl: (77) Problem with the SSL CA cert (path? access rights?)

我尝试了不同的方法,但无法弄清楚问题所在。任何帮助将不胜感激。

【问题讨论】:

  • 检查您是否在 php.ini 中启用了php_openssl 扩展
  • curl 二进制文件和 php curl 模块是独立的。这与 PHP 无关,因为您从 bash 调用 curl。
  • 是的,但两者都使用相同的证书,问题出在我的证书上。
  • Stack Overflow 是一个编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参阅帮助中心的What topics can I ask about here。也许Super UserUnix & Linux Stack Exchange 会是一个更好的提问地方。另见Where do I post questions about Dev Ops?

标签: php curl redhat libcurl nss


【解决方案1】:

我的证书文件不正确。它是从http://curl.haxx.se/ca/cacert.pem 下载的。必须将 http 更改为 https。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-24
    • 1970-01-01
    • 1970-01-01
    • 2013-09-24
    • 2015-06-05
    • 2015-06-27
    • 1970-01-01
    相关资源
    最近更新 更多