コピペコードで快適生活

明日使えるソースを自分のために

コマンドで証明書の中身を確認する

ドメインから確認する

openssl s_client -connect example.com:443 -showcerts

サーバ証明書の中身を見る

openssl x509 -text -noout -in ***.crt

※crtファイルには中間証明書が含まれる場合もある。

秘密鍵の中身を見る

openssl rsa -text -noout -in ***.key

CSRの中身を見る

openssl req -text -noout -in ***.csr

p12ファイルからサーバ証明書を取り出す

openssl pkcs12 -in xxx.p12 -nodes -clcerts -out xxx.pem -password pass:xxxxx

p12ファイルの中身を確認する

keytool -list -v -keystore xxx.p12 -storetype PKCS12 -storepass xxxxx

link