【curl】オレオレ証明書の有効性を証明する
環境
curl 7.68.0
手順
--cacertで証明書ファイルを指定すれば良い
指定しないと自己証明書のため引っかかるが
code:no cacert option
$ curl https://example.com
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
指定するとそれを使用して通信してくれる
code:cacert option
$ curl https://example.com --cacert path/to/test.crt
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
...
参考
https://www.mtioutput.com/entry/curl-crt-use
curl