【问题标题】:Drupal Curl SSL Certificate ErrorDrupal Curl SSL 证书错误
【发布时间】:2015-04-29 14:23:12
【问题描述】:

我们正在使用 Drupal / Ubercart 网站,最近我注意到付款请求失败。

在 Drupal 日志中,我看到如下错误:

cURL 错误:SSL 证书问题:无法获取本地颁发者 证书

我找到了许多解决方案,并尝试实施它们,但没有任何结果。我尝试过的一些事情是:

  1. 修改我的/etc/php5/fpm/php.ini 文件以包含curl.cainfo = /srv/keys/cacert.pem 行(这是我从http://curl.haxx.se/ca/cacert.pem 下载的文件)。
  2. uc_authorizenet.module文件中添加代码直接指定cainfo:curl_setopt($ch, CURLOPT_CAINFO, "/srv/keys/cacert.pem");

在采取这些步骤之前,我确保ca-certificates 软件包已安装并且是最新的。每次更改后,我都重新启动了 php5-fpmnginx,但我仍然收到关于无法获取本地颁发者证书的相同错误。

感谢您的帮助!

【问题讨论】:

    标签: php curl drupal authorize.net


    【解决方案1】:

    问题是 https://secure.authorize.net/gateway/transact.dll 的根 CA(可能还有 authorize.net 上的其他安全 URL)没有包含在 CA 捆绑包 http://curl.haxx.se/ca/cacert.pem 中,这是有充分理由的:如果您访问该页面并查看详细信息在证书路径中的根 CA 中,您会注意到 Sha1 指纹是 99 a6 9b e6 1a fe 88 6b 4d 2b 82 00 7c b8 54 fc 31 7e 15 39 。在 Internet 上搜索将引导您到此页面 https://blog.mozilla.org/security/2014/09/08/phasing-out-certificates-with-1024-bit-rsa-keys/ ,说明此根证书不再受信任。类似问题中提供了解决方案:How comes authorize.net uses a certificate that is signed with a CA that is not in the well known curl.haxx.se/ca/cacert.pem list?

    【讨论】:

      猜你喜欢
      • 2012-09-17
      • 2017-11-21
      • 2018-02-19
      • 2015-06-05
      • 1970-01-01
      • 2017-04-22
      • 1970-01-01
      • 2017-03-21
      • 1970-01-01
      相关资源
      最近更新 更多