ピア証明書発行者を提供するすべてのTLS要求は、ユーザーが信頼できないとマークされています。

ピア証明書発行者を提供するすべてのTLS要求は、ユーザーが信頼できないとマークされています。

私は最近google.comにhttpsリクエストをしようとすると見え始めました。

[root@ip-172-31-47-76 ~]# curl -I -v https://google.com
* Rebuilt URL to: https://google.com/
*   Trying 216.58.193.78...
* TCP_NODELAY set
* Connected to google.com (216.58.193.78) 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=*.google.com,O=Google Inc,L=Mountain View,ST=California,C=US
*       start date: Feb 20 14:17:23 2018 GMT
*       expire date: May 15 14:08:00 2018 GMT
*       common name: *.google.com
*       issuer: CN=Google Internet Authority G2,O=Google Inc,C=US
* NSS error -8172 (SEC_ERROR_UNTRUSTED_ISSUER)
* Peer's certificate issuer has been marked as not trusted by the user.
* stopped the pause stream!
* Closing connection 0
curl: (60) Peer's certificate issuer has been marked as not trusted by the user.
More details here: https://curl.haxx.se/docs/sslcerts.html

Yum の更新要求も失敗するため、これはシステムの更新機能に影響します。このページの指示を使用して証明書を再インポートしようとしました。https://access.redhat.com/solutions/1549003。また、こちらの手順を使用して手動でGoogle証明書を追加してみました。https://curl.haxx.se/docs/sslcerts.html。どちらも機能しません。

関連があるかどうかはわかりませんが、さらなるトラブルシューティングのためにcertutilユーティリティを試してみましたが、うまくいきません。

[root@ip-172-31-47-76 ~]# certutil
certutil: /usr/local/firefox/libnss3.so: version `NSS_3.30' not found (required by certutil)

ここで何が起こっているのかよくわかりませんが、助けてくれてありがとう。 Amazon Linuxイメージを使用しています。

ベストアンサー1

あなたのエラーをシミュレートすることはできませんが、証明書を手動で更新した後は機能すると思います。これを行うには、特定のサーバーのCA証明書を抽出する簡単な方法「openssl」ツールを使用できます。

1.サーバー公開証明書をインポートしてconn_cert.log.pemファイルに保存し、次のコマンドを入力してEnterを押します。

openssl s_client -showcerts -servername https://google.com -connect google.com:443 > conn_cert.log.pem

2.ここで「quit」と入力してEnterを押します。

三。「conn_cert.log.pem」ファイルの証明書は、「BEGIN CERTIFICATE」と「END CERTIFICATE」文字列の間にありますが、異なるログメッセージがあります。これで、ログファイルから証明書を抽出して "google_public"中.crt"。

openssl x509 -inform PEM -in conn_cert.log.pem -text -out google_public.crt

4.最後に、無効な証明書を新しい証明書で上書きします。

cp google_public.crt /etc/pki/tls/certs/ca-bundle.crt

5.もう一度テストしてみてください。

参考資料:

おすすめ記事