卷曲(60)无法获得本地发行人证书

时间:2016-03-01 14:07:52

标签: unix ssl curl

我正在尝试使用curl连接到OneDrive API(https://api.onedrive.com),但它会抛出我

curl: (60) SSL certificate problem: unable to get local issuer certificate

该页面在Firefox中打开,没有证书警告。我检查了证书信息,将所有三个证书(Baltimore Cyber​​Trust Root,Microsoft IT SSL SHA2和storage.live.com)放入/ usr / share / ca-certificates并使用

安装它们
dpkg-reconfigure ca-certificates

但是,我一直收到这个错误。有什么想法吗?

me@host:~$ curl -vi https://api.onedrive.com
* Rebuilt URL to: https://api.onedrive.com/
* Hostname was NOT found in DNS cache
*   Trying 134.170.109.152...
* Connected to api.onedrive.com (134.170.109.152) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs/
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

me@host:~$ curl -V
curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1k zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP 

0 个答案:

没有答案