GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Curl:(60) Certificato SSL Problema:impossibile ottenere il certificato dell'emittente locale?

Modifica:
Avevo aggiornato i miei certificati CA radice da curl.haxx.se .

Quando provo curl -Iv https://yahoo.com Ricevo un errore come unable to get local issuer certificate nel risultato. Tuttavia, se provo curl -Iv --cacert /etc/ssl/certs/ca-certificates.crt https://yahoo.com Ottengo un risultato senza alcun errore.

Stranamente curl -Iv https://google.com funziona correttamente. Ma curl -Iv https://deb.nodesource.com no.

C'è qualche possibilità di superare questo problema? (modificando la configurazione dell'arricciatura, ecc.)

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

Risposta accettata:

Perché curl non è in grado di verificare il certificato fornito dal server.

Ci sono due modi per bypassare:

1.aggiungi -k opzione che consente a curl di effettuare connessioni non sicure, che non verifica il certificato.

2.aggiungi root curl ca (scarica qui) a /etc/ssl/certs/nodesource-ca.crt


Ubuntu
  1. Let's Encrypt:ottieni un certificato SSL gratuito utilizzando Certbot

  2. Che cos'è un certificato SSL?

  3. Installa un certificato SSL

  4. Acquista o rinnova un certificato SSL

  5. Come ottenere un certificato SSL gratuito con SSL It! e Let's Encrypt su Plesk

Creazione di un certificato SSL autofirmato

Come creare un certificato TLS/SSL con un operatore Cert-Manager su OpenShift

OpenSSL:controlla la data di scadenza del certificato SSL e ottieni maggiori informazioni

Strumento di verifica SSL

Come creare un certificato SSL autofirmato locale su CentOS 8

Come controllare la data di scadenza SSL su Plesk