Check whether a private key matches a certificate
check private key matches certificate | key values mismatch apache | compare ssl key and certificate modulus | which key belongs to this certificate | openssl | certificate | private-key | modulusopenssl x509 -noout -modulus -in /etc/ssl/certs/example.com.crt | openssl md5 && openssl rsa -noout -modulus -in /etc/ssl/private/example.com.key | openssl md5Prints two MD5 checksums, one for the modulus of the certificate and one for that of the private key. If both are identical, key and certificate belong together. If they differ, the web server will not start or reports key values mismatch.
Note: Only works with RSA keys. For ECDSA, compare the public keys instead: openssl x509 -noout -pubkey -in cert.pem against openssl pkey -pubout -in key.pem.
Also searched as
- check private key matches certificate
- key values mismatch apache
- compare ssl key and certificate modulus
- which key belongs to this certificate