Checking if the SSL certificate and RSA private key matches from command line

Here are two commands which you need to run from the console to check .key and .crt files

#openssl rsa -noout -text -in http://www.domainname.com.key
#openssl x509 -noout -text -in http://www.domainname.com.crt

Check for modulus part in the output of both commands

If the modulus output match, then your .crt and .key files are matching.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: