Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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 [中間証明書]

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

cs_sonar
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした