2016-04-22 120 views
9
 
[[email protected] 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 

[[email protected] 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 

回答

16

捲曲7.19.7(x86_64的-紅帽-Linux的GNU)的libcurl/7.19.7 NSS/3.19.1基本ECC的zlib/1.2.3的libidn/1.18 libssh2 /1.4.2

您正在使用一個非常舊的捲曲版本。 我的猜測是你遇到了bug described 6 years ago。修正是更新你的捲曲。

4

如果更新cURL不能解決它,更新NSS應該做的伎倆。

3

如果您使用curl版本curl-7.19.7-46.el6.x86_64或更舊版本。請提供一個選項-k1(小K1)。