【发布时间】:2013-06-12 11:42:57
【问题描述】:
就在最近,我的服务器停止处理对我的 Web 服务器的 https:// 地址的 curl 请求。经过一番挖掘,似乎是网络服务器正在运行的用户存在问题。
如果我以 root 身份 SSH 到服务器并调用
curl -I -v https://google.com
...我得到以下响应...
* About to connect() to google.com port 443 (#0)
* Trying 173.194.67.113... connected
* Connected to google.com (173.194.67.113) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using SSL_RSA_WITH_RC4_128_SHA
* Server certificate:
* subject: CN=*.google.com,O=Google Inc,L=Mountain View,ST=California,C=US
* start date: May 22 15:50:20 2013 GMT
* expire date: Oct 31 23:59:59 2013 GMT
* common name: *.google.com
* issuer: CN=Google Internet Authority,O=Google Inc,C=US
> HEAD / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: google.com
> Accept: */*
但是,如果我以任何 cPanel 帐户(也用于通过 Web 服务器运行时)登录,我会得到以下信息...
* About to connect() to google.com port 443 (#0)
* Trying 173.194.67.101... connected
* Connected to google.com (173.194.67.101) port 443 (#0)
* Initializing NSS with certpath: none
* NSS error -5978
* Closing connection #0
* Problem with the SSL CA cert (path? access rights?)
curl: (77) Problem with the SSL CA cert (path? access rights?)
我无法找到问题的明确答案,并且我的托管公司拒绝提供帮助,因为它“失去支持”,尽管上周运行良好!
我确实在http://curl.haxx.se/docs/sslcerts.html 上找到了提及
"如果 libcurl 是在 NSS 支持下构建的,那么取决于操作系统发行版, 可能需要采取一些额外的步骤来使用系统范围的 CA 证书数据库。 RedHat 附带了一个附加模块 libnsspem.so,它支持 NSS 读取 OpenSSL PEM CA 包。 OpenSuSE 中缺少该库,并且 没有它,NSS 只能使用它自己的内部格式。 NSS 也有一个新的 数据库格式:https://wiki.mozilla.org/NSS_Shared_DB"
...但我找不到有关如何在我的 CentOS 服务器上获得此工作系统范围的信息。
信息
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
谁能解释一下为什么这可能会突然改变,或者更好的是如何解决它?
谢谢
【问题讨论】: