Skip to content

Instantly share code, notes, and snippets.

@jgyllen
Created February 23, 2011 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgyllen/840163 to your computer and use it in GitHub Desktop.
Save jgyllen/840163 to your computer and use it in GitHub Desktop.
Extracting information from an SSL certificate using OpenSSL
# Using the -text option will give you the full breadth of information.
openssl x509 -text -in cert.pem
# Other options will provide more targeted sets of data.
# who issued the cert?
openssl x509 -noout -in cert.pem -issuer
# to whom was it issued?
openssl x509 -noout -in cert.pem -subject
# for what dates is it valid?
openssl x509 -noout -in cert.pem -dates
# the above, all at once
openssl x509 -noout -in cert.pem -issuer -subject -dates
# what is its hash value?
openssl x509 -noout -in cert.pem -hash
# what is its MD5 fingerprint?
openssl x509 -noout -in cert.pem -fingerprint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment