in unix

Validate SSL certificate with the Private Key

To valid a SSL certificate with the private key, follow the 3 steps below. I have the SSL certificate shahalpk.name.crt and the private key shahalpk.name.key.

  1. Execute the below command for the SSL certificate
    openssl x509 -modulus -noout -in shahalpk.name.crt | openssl md5
    

    Output

    (stdin)= 9115096b827915e181b6b29bf5a049f1
    
  2. Execute the below command for the private key
    openssl rsa -check -noout -in shahalpk.name.key | openssl md5
    

    Output

    (stdin)= 9115096b827915e181b6b29bf5a049f1
    
  3. If output of both the commands are same, then your private key is matching with your SSL certificate.

Write a Comment

Comment