Contents
How do I get x509 certificate thumbprint?
OTHER TIPS
- Using Apache Commons Codec you can do: DigestUtils.sha1Hex(cert.getEncoded())
- You can generate the thumbprint by using the openssl command, so example if you have the pem format of the certificate in a file (file.txt) then:
- One-liner using Google’s Guava.
- Here’s a simpler way:
What is x509 certificate thumbprint?
A certificate’s fingerprint is the unique identifier of the certificate. Microsoft Internet Explorer calls it Thumbprint. The Certificate Fingerprint is a digest (hash function) of a certificate in x509 binary format. It can be calculated by different algorithms, such as SHA1 for Microsoft Internet Explorer.
How do I create a thumbprint certificate?
Right-click on the certificate file and choose Find Certificates dialog. Use the dialog to locate the certificate file from your provider. When the Certificate dialog displays, Click the Details tab. Locate and select the Thumbprint field to display the thumbprint from your certificate.
How to generate X509 certificate thumbprint in OpenSSL?
You can generate the thumbprint by using the openssl command, so example if you have the pem format of the certificate in a file (file.txt) cat file.txt | openssl x509 -sha1 -fingerprint – this would generate the same thumbprint Short example without using any libraries.
How to calculate the fingerprint of a X.509 certificate?
This tool calculates the fingerprint of an X.509 public certificate. A fingerprint is a digest of the whole certificate. In this case we use the SHA1 algorithm. Sometimes applications ask for its fingerprint, which easier for work with, instead of requiring the X.509 public certificates (a long string).
Where can I find the thumbprint of a certificate?
Remarks. The thumbprint is dynamically generated using the SHA1 algorithm and does not physically exist in the certificate. Since the thumbprint is a unique value for the certificate, it is commonly used to find a particular certificate in a certificate store.
Are there different versions of X.509 certificate?
X.509 certificates, in turn, currently come in three versions, v1, v2 and v3. The v3 certificates are described in RFC 5280. For the remainder of this post the terms certificate, public key certificate and X.509 certificate are used interchangeably.