LoginSignup
35
41

More than 5 years have passed since last update.

秘密鍵、証明書、CSRの整合性のチェック

Last updated at Posted at 2014-10-27

ApacheのSSL更新等で秘密鍵や証明書を組み込む場合、
整合性がとれないとエラーとなりApacheが落ちてしまう。

実は秘密鍵や証明書はApacheに入れる前に整合性チェックを行う事ができる

秘密鍵の内容を確認

openssl rsa -text -noout -in [秘密鍵]

CSRの内容を確認

openssl req -text -noout -in [CSR]

証明書の内容を確認

openssl x509 -text -noout -in [証明書]

上記コマンドで出力された「modules」の値を見比べて
完全に一致していれば整合性がとれている。

中間証明書と証明書の整合性

openssl x509 -issuer_hash -noout -in [証明書]
openssl x509 -subject_hash -noout -in [中間証明書]

同じ値が出力されれば整合性が取れている

35
41
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
41