Decoding SSL certificates and signing requests with OpenSSL

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search
  • To decode a certificate, run:
openssl x509 -text -noout -in example.com.crt


  • To decode a certificate signing request (CSR), run:
openssl req -noout -text -in mycsr.csr


  • To check if the key and crt match, run:
openssl x509 -noout -modulus -in server.crt | openssl md5
openssl rsa -noout -modulus -in server.key | openssl md5