Verify SSL Key matches with Private Key

To verify if SSL key match with the private Key, run following commands and compare resulting hash, it should match if SSL and Keys are matching.

Verify Private Key

openssl rsa -modulus -noout -in MY_DOMAIN.key | sha256sum

Verify SSL

openssl x509 -modulus -noout -in MY_DOMAIN.crt | sha256sum

Verify CSR

openssl req -modulus -noout -in MY_DOMAIN.csr | sha256sum

PHP Script to verify private key matches SSL certificate?
ssl

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *