HTTP/TLS デバッグ (curl / wget / openssl s_client) チート集
curl、wget、openssl s_client で HTTP ヘッダ、リダイレクト、POST、認証、TLS バージョン、証明書チェーン、有効期限、OCSP、HTTP/2/3 を調べるための実用チート集。
- 更新日
- 2026-05-29
- 参照範囲
- 公式ドキュメント / man page / 主要ベンダーCLI
- 対象実装
- 主要 Linux / BSD / ネットワーク機器 CLI の一般的な実装
- 免責
- OS とバージョン差分は実環境で確認してください。
このチートシートの使いどころ
HTTP/TLS デバッグチートシートは、curl、wget、openssl s_client でヘッダ、リダイレクト、POST、認証、TLS、証明書チェーンを確認するための実例集です。対象は一般的な Linux/macOS/Windows の CLI と現行 HTTP/TLS 実装です。ブラウザだけでは見えないリダイレクトや TLS 終端、Cookie、CORS、HSTS の切り分けで使います。
36 / 36
curl URLcurl / wget / openssl s_client で curl URL を実務運用で使う
$ curl https://example.comcurl -Icurl / wget / openssl s_client で curl -I を実務運用で使う
$ curl -I https://example.comcurl -Lcurl / wget / openssl s_client で curl -L を実務運用で使う
$ curl -L https://example.com/redirectcurl -ocurl / wget / openssl s_client で curl -o を実務運用で使う
$ curl -o index.html https://example.comcurl -X POST -dcurl / wget / openssl s_client で curl -X POST -d を実務運用で使う
$ curl -X POST -d "name=alice" https://api.example.com/userscurl --data-urlencodecurl / wget / openssl s_client で curl --data-urlencode を実務運用で使う
$ curl -G --data-urlencode "q=日本語" https://example.com/searchcurl -Fcurl / wget / openssl s_client で curl -F を実務運用で使う
$ curl -F "file=@report.txt" https://api.example.com/uploadcurl -ucurl / wget / openssl s_client で curl -u を実務運用で使う
$ curl -u user:pass https://example.com/basiccurl -Hcurl / wget / openssl s_client で curl -H を実務運用で使う
$ curl -H "Authorization: Bearer TOKEN" https://api.example.comcurl cookiecurl / wget / openssl s_client で curl cookie を実務運用で使う
$ curl -b cookies.txt -c cookies.txt https://example.comcurl --compressedcurl / wget / openssl s_client で curl --compressed を実務運用で使う
$ curl --compressed https://example.comcurl --resolvecurl / wget / openssl s_client で curl --resolve を実務運用で使う
$ curl --resolve example.com:443:203.0.113.10 https://example.comcurl -vcurl / wget / openssl s_client で curl -v を実務運用で使う
$ curl -v https://example.comcurl --trace-timecurl / wget / openssl s_client で curl --trace-time を実務運用で使う
$ curl --trace-time --trace-ascii /tmp/trace.txt https://example.comcurl -w timecurl / wget / openssl s_client で curl -w time を実務運用で使う
$ curl -o /dev/null -s -w "%{time_total}\n" https://example.comcurl --http2curl / wget / openssl s_client で curl --http2 を実務運用で使う
$ curl --http2 -I https://example.comcurl --http3curl / wget / openssl s_client で curl --http3 を実務運用で使う
$ curl --http3 -I https://example.comcurl -kcurl / wget / openssl s_client で curl -k を実務運用で使う
$ curl -k https://selfsigned.example.comcurl --cacertcurl / wget / openssl s_client で curl --cacert を実務運用で使う
$ curl --cacert ca.pem https://internal.example.comcurl --cert-statuscurl / wget / openssl s_client で curl --cert-status を実務運用で使う
$ curl --cert-status https://example.comcurl --tls-maxcurl / wget / openssl s_client で curl --tls-max を実務運用で使う
$ curl --tls-max 1.3 https://example.comwget URLcurl / wget / openssl s_client で wget URL を実務運用で使う
$ wget https://example.com/file.tar.gzwget -Ocurl / wget / openssl s_client で wget -O を実務運用で使う
$ wget -O latest.tgz https://example.com/file.tar.gzwget -mcurl / wget / openssl s_client で wget -m を実務運用で使う
$ wget -m -np https://example.com/docs/wget -Ncurl / wget / openssl s_client で wget -N を実務運用で使う
$ wget -N https://example.com/file.tar.gzwget --load-cookiescurl / wget / openssl s_client で wget --load-cookies を実務運用で使う
$ wget --load-cookies cookies.txt https://example.com/privatewget --spidercurl / wget / openssl s_client で wget --spider を実務運用で使う
$ wget --spider https://example.com/healthwget --headercurl / wget / openssl s_client で wget --header を実務運用で使う
$ wget --header="Authorization: Bearer TOKEN" https://api.example.comopenssl s_client connectcurl / wget / openssl s_client で openssl s_client connect を実務運用で使う
$ openssl s_client -connect example.com:443 -servername example.com < /dev/nullopenssl s_client showcertscurl / wget / openssl s_client で openssl s_client showcerts を実務運用で使う
$ openssl s_client -connect example.com:443 -servername example.com -showcerts < /dev/nullopenssl s_client tls1_3curl / wget / openssl s_client で openssl s_client tls1_3 を実務運用で使う
$ openssl s_client -connect example.com:443 -servername example.com -tls1_3 < /dev/nullopenssl s_client ciphercurl / wget / openssl s_client で openssl s_client cipher を実務運用で使う
$ openssl s_client -connect example.com:443 -servername example.com -cipher ECDHE < /dev/nullopenssl x509 textcurl / wget / openssl s_client で openssl x509 text を実務運用で使う
$ openssl x509 -in cert.pem -text -nooutopenssl x509 datescurl / wget / openssl s_client で openssl x509 dates を実務運用で使う
$ openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -noout -datesopenssl x509 issuercurl / wget / openssl s_client で openssl x509 issuer を実務運用で使う
$ openssl x509 -in cert.pem -noout -issuer -subjectopenssl verifycurl / wget / openssl s_client で openssl verify を実務運用で使う
$ openssl verify -CAfile ca.pem cert.pem| Command | Description | Example | Copy |
|---|---|---|---|
curl URL | curl / wget / openssl s_client で curl URL を実務運用で使う | $ curl https://example.com | |
curl -I | curl / wget / openssl s_client で curl -I を実務運用で使う | $ curl -I https://example.com | |
curl -L | curl / wget / openssl s_client で curl -L を実務運用で使う | $ curl -L https://example.com/redirect | |
curl -o | curl / wget / openssl s_client で curl -o を実務運用で使う | $ curl -o index.html https://example.com | |
curl -X POST -d | curl / wget / openssl s_client で curl -X POST -d を実務運用で使う | $ curl -X POST -d "name=alice" https://api.example.com/users | |
curl --data-urlencode | curl / wget / openssl s_client で curl --data-urlencode を実務運用で使う | $ curl -G --data-urlencode "q=日本語" https://example.com/search | |
curl -F | curl / wget / openssl s_client で curl -F を実務運用で使う | $ curl -F "file=@report.txt" https://api.example.com/upload | |
curl -u | curl / wget / openssl s_client で curl -u を実務運用で使う | $ curl -u user:pass https://example.com/basic | |
curl -H | curl / wget / openssl s_client で curl -H を実務運用で使う | $ curl -H "Authorization: Bearer TOKEN" https://api.example.com | |
curl cookie | curl / wget / openssl s_client で curl cookie を実務運用で使う | $ curl -b cookies.txt -c cookies.txt https://example.com | |
curl --compressed | curl / wget / openssl s_client で curl --compressed を実務運用で使う | $ curl --compressed https://example.com | |
curl --resolve | curl / wget / openssl s_client で curl --resolve を実務運用で使う | $ curl --resolve example.com:443:203.0.113.10 https://example.com | |
curl -v | curl / wget / openssl s_client で curl -v を実務運用で使う | $ curl -v https://example.com | |
curl --trace-time | curl / wget / openssl s_client で curl --trace-time を実務運用で使う | $ curl --trace-time --trace-ascii /tmp/trace.txt https://example.com | |
curl -w time | curl / wget / openssl s_client で curl -w time を実務運用で使う | $ curl -o /dev/null -s -w "%{time_total}\n" https://example.com | |
curl --http2 | curl / wget / openssl s_client で curl --http2 を実務運用で使う | $ curl --http2 -I https://example.com | |
curl --http3 | curl / wget / openssl s_client で curl --http3 を実務運用で使う | $ curl --http3 -I https://example.com | |
curl -k | curl / wget / openssl s_client で curl -k を実務運用で使う | $ curl -k https://selfsigned.example.com | |
curl --cacert | curl / wget / openssl s_client で curl --cacert を実務運用で使う | $ curl --cacert ca.pem https://internal.example.com | |
curl --cert-status | curl / wget / openssl s_client で curl --cert-status を実務運用で使う | $ curl --cert-status https://example.com | |
curl --tls-max | curl / wget / openssl s_client で curl --tls-max を実務運用で使う | $ curl --tls-max 1.3 https://example.com | |
wget URL | curl / wget / openssl s_client で wget URL を実務運用で使う | $ wget https://example.com/file.tar.gz | |
wget -O | curl / wget / openssl s_client で wget -O を実務運用で使う | $ wget -O latest.tgz https://example.com/file.tar.gz | |
wget -m | curl / wget / openssl s_client で wget -m を実務運用で使う | $ wget -m -np https://example.com/docs/ | |
wget -N | curl / wget / openssl s_client で wget -N を実務運用で使う | $ wget -N https://example.com/file.tar.gz | |
wget --load-cookies | curl / wget / openssl s_client で wget --load-cookies を実務運用で使う | $ wget --load-cookies cookies.txt https://example.com/private | |
wget --spider | curl / wget / openssl s_client で wget --spider を実務運用で使う | $ wget --spider https://example.com/health | |
wget --header | curl / wget / openssl s_client で wget --header を実務運用で使う | $ wget --header="Authorization: Bearer TOKEN" https://api.example.com | |
openssl s_client connect | curl / wget / openssl s_client で openssl s_client connect を実務運用で使う | $ openssl s_client -connect example.com:443 -servername example.com < /dev/null | |
openssl s_client showcerts | curl / wget / openssl s_client で openssl s_client showcerts を実務運用で使う | $ openssl s_client -connect example.com:443 -servername example.com -showcerts < /dev/null | |
openssl s_client tls1_3 | curl / wget / openssl s_client で openssl s_client tls1_3 を実務運用で使う | $ openssl s_client -connect example.com:443 -servername example.com -tls1_3 < /dev/null | |
openssl s_client cipher | curl / wget / openssl s_client で openssl s_client cipher を実務運用で使う | $ openssl s_client -connect example.com:443 -servername example.com -cipher ECDHE < /dev/null | |
openssl x509 text | curl / wget / openssl s_client で openssl x509 text を実務運用で使う | $ openssl x509 -in cert.pem -text -noout | |
openssl x509 dates | curl / wget / openssl s_client で openssl x509 dates を実務運用で使う | $ openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -noout -dates | |
openssl x509 issuer | curl / wget / openssl s_client で openssl x509 issuer を実務運用で使う | $ openssl x509 -in cert.pem -noout -issuer -subject | |
openssl verify | curl / wget / openssl s_client で openssl verify を実務運用で使う | $ openssl verify -CAfile ca.pem cert.pem |