秘密鍵の内容を確認†# openssl rsa -text -noout -in 秘密鍵のファイル CSRの内容を確認†# openssl req -text -noout -in CSRファイル 証明書の内容を確認†# openssl x509 -text -noout -in 証明書ファイル 証明書の内容とサーバーの鍵が一致するか確認†# openssl x509 -noout -modulus -in test.inamuu.com.crt | md5sum a996d8f2415ba36dc5eew0f0d190e274 - # openssl rsa -noout -modulus -in test.inamuu.com.key | md5sum a996d8f2415ba36dc5eew0f0d190e274 - 証明書の鍵とサーバーにある鍵が一致するかを確認†openssl x509 -pubkey < server.crt openssl rsa -pubout < server.key -----BEGIN PUBLIC KEY----- 以降のデータが一致すればOK 中間証明書の有効性を確認†パターン1 openssl verify -CAfile CAファイル < 証明書 stdin:OK 上記表示されればOK パターン2 # openssl x509 -issuer_hash -noout -in test.inamuu.com.crt 79701ca5 # openssl x509 -subject_hash -noout -in test.inamuu.com.crt.ca 79701ca5 一致すればOK。 opensslコマンドで簡易サーバーを起動してチェック†$ openssl s_server -key 秘密鍵 -cert 証明書 -CAfile 中間証明書 -WWW ※デフォルト4433ポート ※hostsに証明書で指定したコモンネームを127.0.0.1に向ける ブラウザで、 https://コモンネーム:4433 へアクセス出来るか確認する
|