2017-11-30 9 views
0

는 경우에 CentOS 6 일에 컬의 이상한 행동을 발견 (7) :CURL이 https 리소스를로드하지 못합니다. NSS 오류가 나는 신선한 전용 서버를 구성하기 위해 노력했습니다 -8181

curl "https://google.com" 

반환

curl (60): Peer certificate cannot be authenticated with known CA certificates 

는 곱슬 곱슬처럼 보인다 현재 시스템에 설치된 CA에 대해 아무것도 모릅니다.

# curl https://google.com --verbose 
* About to connect() to google.com port 443 (#0) 
* Trying 172.217.25.174... connected 
* Connected to google.com (172.217.25.174) port 443 (#0) 
* Initializing NSS with certpath: sql:/etc/pki/nssdb 
* CAfile: /etc/pki/tls/certs/ca-bundle.crt 
    CApath: none 
* Remote Certificate has expired. 
* NSS error -8181 
* Closing connection #0 
* Peer certificate cannot be authenticated with known CA certificates 
curl: (60) Peer certificate cannot be authenticated with known CA certificates 
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. 

--insecure은 좋지 않습니다.

  • 도 실행에 직접
  • 을 곱슬 곱슬하는 --cacert 옵션을 설정 update-ca-trust extract
  • 다운로드 타사 CA 인증서를 통해

    • ca-certificates를 다시 설치
    • 추출물 인증서를 :

      나는에 시도했다

      하지만 도움이되지 않습니다.

      처음 생각해 보았습니다. 신선한 OS에는 실제 버전의 인증서가 없었지만, 어떻게하면 yum update -y을 작성할 수 있습니까? 실제 일 것임에 틀림 없는가?

      이전에 질문 된 사항이 get-60-error-with-curl과 그 외 여러 가지를 확인했습니다.

  • 답변

    0

    나를 알아 낸 유일한 한 가지는 컬 실행의 자세한 응답에서 해당 라인이 - * Remote Certificate has expired. 인 것입니다.

    Google의 인증서가 만료 된 상태 일 수있는 방법은 무엇입니까? 지금 몇시에요?

    아차 : 지금

    # date 
    Friday, 10 May 2015 12:35:21 -0400 
    

    그러나이 2017년 11월 30일입니다.

    좋아

    ,

    sudo yum install ntp ntpdate -y 
    

    은 다음 /etc/ntpd.conf을 확인해야합니다, 그것은 존재하지 않는 경우 :

    sudo su 
    echo "server 0.pool.ntp.org" > /etc/ntpd.conf && service ntpd start 
    

    그리고 확인 :

    의 현지 설정

    잊지 마세요

    # date 
    Thursday, 30 November 2017 14:03:35 +0000 
    
    , 예 : UTC 시간 :

    sudo mv /etc/localtime /tmp/localtime.bak 
    sudo ln -s /usr/share/zoneinfo/UTC /etc/localtime 
    

    P. 얻을 수있는 ntp 구성에 대한 추가 정보 here