Ask a Question

Solution ID : SO28771

How to View a Certificate Fingerprint as SHA-256, SHA-1 or MD5 using OpenSSL

Problem

How to View a Certificate Thumbprint as SHA-256, SHA-1 or MD5 using OpenSSL

How to View a Certificate Fingerprint as SHA-256, SHA-1 or MD5 using OpenSSL

Solution

Depending on the server platform, only the SHA-1 or MD5 Fingerprint/Thumbprint may be displayed.  The algorithm of the Fingerprint/Thumbprint is unrelated to the encryption algorithm of the certificate.  The Fingerprint/Thumbprint is a identifier used by some server platforms to locate the certificate in a certificate store.


The commands below can be used to view the certificate fingerprint/thumbprint.
 

  • SHA-256
    openssl x509 -noout -fingerprint -sha256 -inform pem -in [certificate-file.crt]

     
  • SHA-1
    openssl x509 -noout -fingerprint -sha1 -inform pem -in [certificate-file.crt]

     
  • MD5
    openssl x509 -noout -fingerprint -md5 -inform pem -in [certificate-file.crt]

    The example below is displaying the value of the same certificate using each algorithm.