Linux全般


秘密鍵の内容を確認

# 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。


参考URL:https://www.insaneworks.co.jp/kota/openssl-tips/ 参考URL:https://www.skyarch.net/blog/?p=3376


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS