2023年10月23日

確認憑證和私鑰是否匹配

環境 1.Ubuntu 20.04 2.OpenSSL 1.1.1f 指令
crt - 憑證檔(含公鑰)
$sudo openssl x509 -noout -modulus -in my-server.crt |openssl md5
(stdin)= e9af4bcf8a1af623da89acc78c60f82e
key - 私鑰
$sudo openssl rsa -noout -modulus -in my-server.key |openssl md5
(stdin)= e9af4bcf8a1af623da89acc78c60f82e
csr - 憑證簽章要求
$openssl req -in my-server.csr -noout -modulus | openssl md5
(stdin)= e9af4bcf8a1af623da89acc78c60f82e

0 意見:

張貼留言