卷毛,山猫等不接受本地证书,但远程可以

当我连接到我的networking服务器通过HTTPS查看网站时,我在地址栏中获得了漂亮的绿色电动车事件。 当我使用curl本地连接时,它会抱怨证书并死亡。

我知道我可以跳过证书检查,但我想解决这个问题,因为有些时候这些证书将在本地检查。

我的主机文件(在服务器上)将www.domain.com映射到192.168.100.62。 哪个Apache正在监听(通过对cURL执行相同的地址来确认):

root@web3:~# curl -v https://www.domain.com * About to connect() to www.domain.com port 443 (#0) * Trying 192.168.100.62... connected * Connected to www.domain.com (192.168.100.62) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * Peer's certificate issuer is not recognized: 'CN=Symantec Class 3 EV SSL CA - G3,OU=Symantec Trust Network,O=Symantec Corporation,C=US' * NSS error -8179 * Closing connection #0 * Peer certificate cannot be authenticated with known CA certificates curl: (60) Peer certificate cannot be authenticated with known CA certificates More details here: http://curl.haxx.se/docs/sslcerts.html 

我已经在谷歌周围捅了一下,但似乎无法find太多..它可能是我的根CA束已经过时,或curl本身太旧,连接,但我没有太多的经验。

 root@web3:~# curl --version curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC 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 

cat / etc / redhat-release红帽企业Linux服务器版本6.7(圣地亚哥)

我曾尝试使用update-ca-trust工具添加verisign根证书,但这也没有影响:

 root@web3:anchors# pwd /etc/pki/ca-trust/source/anchors root@web3:anchors# ls VeriSign-Class-3-Public-Primary-Certification-Authority-G3.crt root@web3:anchors# update-ca-trust root@web3:anchors# curl... <snip> same error. 

对于实际问题,我感到有点不知所措。 证书只在互联网IP上有效吗?

我通过下载Symantec_Class_3_EV_SSL_CA_G3.crt并安装它解决了该问题:

 wget http://symantec.tbs-certificats.com/Symantec_Class_3_EV_SSL_CA_G3.crt cp Symantec_Class_3_EV_SSL_CA_G3.crt /etc/pki/ca-trust/source/anchors update-ca-trust 

然后问题就消失了:)不知道为什么这不是默认包含在根CA软件包中。