web-dev-qa-db-ja.com

curl:(60)SSL証明書の問題:ローカル発行者証明書を取得できません

編集: curl.haxx.seからルートCA証明書を更新しました。


curl -Iv https://yahoo.comを試すと、結果にunable to get local issuer certificateのエラーが表示されます。ただし、curl -Iv --cacert /etc/ssl/certs/ca-certificates.crt https://yahoo.comを試すと、エラーなしで結果が得られます。

奇妙なことにcurl -Iv https://google.comは正常に動作します。しかし、curl -Iv https://deb.nodesource.comはそうではありません。

この問題を克服する機会はありますか? (curl構成などを変更することにより)

root@ip-172-31-40-176:/var# curl -Iv https://yahoo.com
* Rebuilt URL to: https://yahoo.com/
* Hostname was NOT found in DNS cache
*   Trying 206.190.36.45...
* Connected to yahoo.com (206.190.36.45) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  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.
2
efkan

Becase curlは、サーバーから提供された証明書を検証できません。

バイパスするには2つの方法があります。

1. -kオプションを追加します。これにより、curlは安全でない接続を確立できますが、証明書は検証されません。

2. root curl ca( ここからダウンロード )を/etc/ssl/certs/nodesource-ca.crtに追加します

2
Mithril

または、私にとっては、単にこれを働いた:

Sudo apt-get install ca-certificates
0
Maxim Krušina