OpenSSL "x509 -fingerprint" - Print Certificate Fingerprint


How to print out MD5 and SHA-1 fingerprints of a certificate using OpenSSL "x509" command? I need to see them and validate them with the owner of the certificate.



Assuming you have a certificate file located at: C:\Users\fyicenter\twitter.crt, you can print out certificate fingerprints using the "x509 -fingerprint" command as shown below:


OpenSSL> x509 -in twitter.crt -noout -fingerprint -md5
MD5 Fingerprint=89:5B:A2:BF:DC:E4:73:DA:46:84:D5:45:6D:81:97:52

OpenSSL> x509 -in twitter.crt -noout -fingerprint -sha1
SHA1 Fingerprint=A3:3B:B5:4C:BC:57:51:3F:94:A3:C2:88:A6:4A:02:C5:F6:8D:40:57

Options used in these commands are:

  • "-fingerprint" - Print out a fingerprint (digest) of the certificate.
  • "-md5" - Use the MD5 digest algorithm to generate the fingerprint
  • "-sha1" - Use the SHA-1 digest algorithm to generate the fingerprint


OpenSSL "x509" Command

⇒⇒OpenSSL Tutorials

2012-07-23, 11499👍, 0💬