
Check whether your private key matches your SSL certificate
If you want to check whether your private key matches your SSL certificate, there are three openssl command to run on:
- the certificate file
- the private key file
- the certificate request file
All of the three outputs have to be the same. The commands are the following:
- check the certificate file:
$ openssl x509 -noout -modulus -in certificate.cer | openssl md5 (stdin)= e3f6fa12345cdf89e7b3a2f4ff4d267e
- check the private key file:
$ openssl rsa -noout -modulus -in private.key | openssl md5 (stdin)= e3f6fa12345cdf89e7b3a2f4ff4d267e
- check the certificate request file:
$ openssl req -noout -modulus -in request.csr | openssl md5 (stdin)= e3f6fa12345cdf89e7b3a2f4ff4d267e
My Powershell script categories
- Active Directory
- Cluster
- Database
- Exchange
- Files and folders
- Hardware
- Network
- Operating System
- PKI
- SCCM
- Service and process
- Tips
- VMWare
Check whether your private key matches your SSL certificate