curlで「自己署名証明書」を受け入れるには【curl: (60) SSL certificate problem: self signed certificate】

Linuxテクニック

Webサイトの構築時などに、「自己署名証明書」でhttps接続のテストを行うことがあります。
しかし、curlコマンドで自己署名証明書のサイトにアクセスすると、以下のようなエラーが出てしまいます。

$ curl https://192.168.1.2
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.

このような場合、「–insecure」オプションを付ければアクセスできます。

$ curl --insecure https://192.168.1.2
Linuxテクニック
\シェアお願いします/
LFI

コメント

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