トラブルシュート

curl で自己証明書を受け入れる curl: (60) SSL certificate problem: self signed certificate

症状

$ curl https://192.168.1.1

等、curl https://{$host} コマンドを打つと以下のエラーが表示され、期待したコンテンツが返ってこない

curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

原因

https サーバから信頼されていない自己署名証明書が提示されたため、リスクがあることを警告している。

対処

--insecure オプションを付けるだけで OK。

$ curl --insecure https://192.168.1.1

コメント

タイトルとURLをコピーしました