Writing

How to decode CSR (Certificate Signing Request) ?

Written in 2017 and kept as it was. Commands and console layouts may have changed since.

What is CSR?

CSR
Certificate Signing Request is encrypted piece of code which is going to used for generating the SSL Certificate for your domain name.

CSR contains the information about Country, State, Location, Organisation Name, Common Name ie Domain Name, Email Address and Public Key.

Lets see how to extract the information from the CSR file?

How to extract information from the CSR?

surya@x ~/ » openssl req -in blog.suryaelite.com.csr -text -noout

How to verify the signature of CSR?

surya@x ~/ » openssl req -in blog.suryaelite.com.csr -noout -verify

To which company certificate is issued to?

surya@x ~/ » openssl req -in blog.suryaelite.com.csr -noout -subject

How to extract Public Key from CSR?

surya@x ~/ » openssl req -in blog.suryaelite.com.csr -noout -pubkey

This is how you can extract the various information from the CSR file.