How to verify whether Private key matches to the SSL certificate
1 min readJan 18, 2019
Certificate key matcher allows you to identify which private key matches to which SSL certificate. It compares the hash of the SSL certificate and the private key to identify a matching pair. You can simply use the below OpenSSL commands to recognize it as follow,
openssl pkey -in privateKey.key -pubout -outform pem | sha256sum
openssl x509 -in cert.crt -pubkey -noout -outform pem | sha256sum
If both commands give the same output, those will be the matching pair.