よく使うopensslまとめ
サーバ証明書を作成するときにお世話になるopensslコマンドですが、なにせ毎日使うものでもないためどうしても使い方を忘れてしまいます。
というわけでよく使うopensslコマンドのメモ。
秘密鍵の作成
openssl genrsa -des3 -out hoge.key 2048
CSRの作成
openssl req -new -key hoge.key -out hoge.csr
証明書の内容を確認
openssl rsa -text -noout -in hoge.crt
パスフレーズの解除
openssl rsa -in hoge.key -out hoge.key
キーペアの確認方法
openssl x509 -in hoge.crt -modulus -noout openssl rsa -in hoge.key -modulus -noout