Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just created a certificate for my Apache SSL host using:

make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/myhost.crt

Now what is the correct way to get the fingerprint out of it? (So I can keep it in other place for visual comparison---in case I need to connect and really don't trust the network?)

openssl sha1 /etc/ssl/private/myhost.crt

Returns a different SHA1 than what Opera tells me about the cert. Is this because it's combined with the key?

(...or am I spoofed already? :-)).

share|improve this question
What do you get if you perform openssl x509 -in /etc/ssl/private/myhost.crt -sha1 -noout -fingerprint? – HeatfanJohn Oct 16 '12 at 3:37
Your command openssl sha1 /etc/ssl/private/myhost.crt Dosn't work cos it computes the sha1 checksum of the whole certificate file, HeatfanJohn's answer is the right way to do it. – JasperWallace Oct 27 '12 at 1:34
up vote 3 down vote accepted

Try this command to determine the SHA1 fingerprint:

openssl x509 -in /etc/ssl/private/myhost.crt -sha1 -noout -fingerprint
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.