curl: (60) Problema de certificado SSL: impossível obter certificado de emissor local

1

Editar: Eu atualizei meus certificados de CA raiz do curl.haxx.se.

Quando eu tento curl -Iv https://yahoo.com , recebo um erro como unable to get local issuer certificate no resultado. No entanto, se eu tentar curl -Iv --cacert /etc/ssl/certs/ca-certificates.crt https://yahoo.com , obtenho um resultado sem nenhum erro.

Estranhamente curl -Iv https://google.com funciona corretamente. Mas curl -Iv https://deb.nodesource.com não.

Existe alguma chance de superar esse problema? (mudando a configuração de curvas etc.)

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.
    
por efkan 26.11.2015 / 19:02

2 respostas

2

O Becase curl não consegue verificar o certificado fornecido pelo servidor.

Existem duas maneiras de ignorar:

1.add -k opção que permite que o curl faça conexões inseguras, o que não verifica o certificado.

2.add root curl ca ( faça o download aqui ) para /etc/ssl/certs/nodesource-ca.crt

    
por Mithril 11.01.2016 / 02:26
0

Ou, para mim, trabalhei simplesmente isso:

sudo apt-get install ca-certificates
    
por Maxim Krušina 02.04.2018 / 17:40