【问题标题】:Php 5.6 unable to get local issuer certificatePHP 5.6 无法获得本地颁发者证书
【发布时间】:2018-07-12 10:47:05
【问题描述】:

我的网站有一个有效的通配符 CA 证书:

  1. myapp.example.com
  2. qamyapp.example.com

我需要使用 php 5.6 curl 使用休息服务。

当尝试执行 php curl 调用 qamyapp.example.com 时,显示下一个错误:

*   Trying xx.xxx.xxx.xx...
* Connected to qamyapp.example.com (xx.xxx.xxx.xx) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: 
ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0

但是当 curl 调用 myapp.example.com 时工作正常。

如何更新 ca-certificates.crt 文件。

【问题讨论】:

  • 您在本地使用的域名和真实的域名一样吗?请记住,仅当域名与证书上的域名匹配时,证书才有效
  • 我已经更新了问题。我看到问题只是当 curl 调用 qamyapp.example.com

标签: php ubuntu curl zend-framework php-5.6


【解决方案1】:

我找到了解决方案。在 qamyapp.example.com 服务器中,需要 concat 到 certificate.crt 文件,bundle.crt 文件的内容,到 NGinx。

【讨论】:

    猜你喜欢
    • 2016-04-20
    • 1970-01-01
    • 2018-03-16
    • 2015-01-05
    • 2016-07-06
    相关资源
    最近更新 更多