Verify SSL Certificate matches Private Key

From Leo's Notes
Revision as of 06:21, 1 September 2019 by Leo (talk | contribs)
This page was last edited on 1 September 2019, at 06:21.

When given a private key and a signed SSL certificate, to validate whether the private key matches that of the certificate:

# openssl x509 -modulus -noout -in server.crt
Modulus=BEF773CAF4790...

# openssl rsa -modulus -noout -in server.key
Modulus=BEF773CAF4790...

If the two modulus matches, the private key is for the certificate.

See Also