View the contents of a SSL cert.

September 14, 2011 at 1:45 pm (Uncategorized) (, , )

Did you just find a thisserver.crt file on your machine and you want to check the details of what it’s for? In other words you have a SSL certificate that you want to decode.

You need to be on Linux and have OpenSSL installed. Then use the x509 module:

openssl x509 -text -in thisserver.crt



Permalink Leave a Comment

Useful OpenSSL commands.

March 8, 2010 at 11:44 am (linux, Technology, TechTips) (, )

Often times I’ll find myself needing to do tasks with SSL certificates using OpenSSL.  I always need to look up the commands again and this takes time.  I became determined to not allow that to happen again.  This time I decided to write this quick cheat sheet of OpenSSL commands that I use often enough.  If you happen to see a command that I use here that you know of a better way to do it, please post a comment with that information for me.

Generate a private RSA key:

openssl genrsa -out host.key 1024

Generate CSR:

openssl req -new -nodes -key host.key -out host.csr
Note:  Make sure that the CN (Common Name) is the FQDN of the site that this certificate is for.

Self Signed Certificate:

openssl x509 -req -days 30 -in host.csr -signkey host.key -out host.cert

View Certificate:

openssl x509 -in filename.cert -noout -text

Permalink Leave a Comment