Curl проверить сертификат неправильно

Я использовал curl, чтобы запустить https-запрос на загрузку файла. Я использовал команду ниже:

curl -v -o Output.pdf https://otherdomain.com/upload/manual-8mm-f35-csii-vdslr-5.pdf

В результате я получаю:

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 184.106.55.122...
* TCP_NODELAY set
* Connected to otherdomain.com (184.106.55.122) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* Server certificate:
*   subject: CN=www.otherdomain.com
*   start date: Aug 01 00:00:00 2018 GMT
*   expire date: Jul 31 12:00:00 2020 GMT
*   common name: www.otherdomain.com
*   issuer: CN=RapidSSL RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US
* NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER)
* Peer's Certificate issuer is not recognized.
* stopped the pause stream!
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (60) Peer's Certificate issuer is not recognized.
More details here: https://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.

Есть идеи, в чем проблема и как я могу ее исправить ?

1
задан 25 January 2019 в 13:22
1 ответ

Проблема в том, к какому сайту вы пытаетесь дозвониться. Похоже, что на их сайте есть неправильно настроенный TLS. В частности, они не посылают промежуточный сертификат под названием "RapidSSL RSA CA 2018", который они должны были включить в конфигурацию своего веб-сервера.

Очевидно, что у сайта есть много других проблем с настройкой TLS.

Вы не можете исправить их веб-сервер, потому что у вас нет контроля над ним. Но, возможно, вы можете связаться с кем-нибудь там, чтобы сообщить ему об их проблеме.

Вы можете сказать curl игнорировать проблему с сертификатом, используя опцию -k, но тогда вы не можете быть уверены, что говорите с настоящим веб сайтом.

.
0
ответ дан 4 December 2019 в 03:18

Теги

Похожие вопросы