【SSL】如何检查openssl生成的pem的证书与私钥是否匹配

2020-12-11  本文已影响0人  Bogon

方式一

# openssl x509 -noout -modulus -in server.crt | openssl md5

# openssl rsa -noout -modulus -in server.key | openssl md5

# (openssl x509 -noout -modulus -in server.crt | openssl md5; openssl rsa -noout -modulus -in server.key | openssl md5) | uniq

方式二

# openssl pkey -in server.key -pubout             -outform pem   | sha256sum

# openssl x509 -in server.crt   -pubkey -noout -outform pem   | sha256sum


参考 

验证密钥与证书是否匹配

https://blog.csdn.net/tsh185/article/details/8233946

https://blog.csdn.net/cyberspecter/article/details/89478218

Certificate Key Matcher

https://www.sslshopper.com/certificate-key-matcher.html

上一篇 下一篇

猜你喜欢

热点阅读