The input to the hash should be the base64-decoded value of the lines
between ----XXXXX CERTIFICATE-----, like this --
openssl x509 -in cer.cert -text | perl -ne 'print if /BEGIN/../END/' |
openssl base64 -d | openssl md5 -hex
Max
Oscar So wrote:
Hi,
I know that to calculate the fingerprint of an x509 certificate is to
hash (SHA1 and MD5)
the PEM format of an x509 certificate.
However, I am not sure if I should hash the whole PEM file or leave the
header and footer alone. For example, should I leave the header
"-----BEGIN CERTIFICATE-----" and
footer "-----END CERTIFICATE-----" alone, and then just hash anything in
between ?
I am having trouble trying to figure out a way to compute the hash value.
I tried so many things!
Thanks,
Oscar
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]