curl:(35)SSL连接错误

cao*_*fei 27 ssl curl

[root@vagrant-centos65 you-get]# curl -v https://api.xxx.cn
* About to connect() to api.xxx.cn port 443 (#0)
*   Trying 123.xxx.xx.xx... connected
* Connected to api.xxx.cn (123.xxx.xx.xx) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -12286
* Closing connection #0
* SSL connect error
curl: (35) SSL connect error

[root@vagrant-centos65 you-get]# curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 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

小智 41

如果更新cURL没有修复它,更新NSS应该可以解决问题.


Ste*_*ich 36

curl 7.19.7(x86_64-redhat-linux-gnu)libcurl/7.19.7 NSS/3.19.1基本ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2

你正在使用一个非常古老的卷曲版本.我的猜测是你遇到了6年前描述错误.修复是更新你的卷曲.


小智 9

如果您使用的是卷曲版本curl-7.19.7-46.el6.x86_64或更早版本.请提供-k1(小K1)选项.

  • 这会禁用证书检查吗?不是很好的建议,特别是如果你不提它! (6认同)