Obtain the fingerprint of the SSL certificate
Every SSL certificate has fingerprint information. If you want to obtain it, you can use openssl or certutil tools on non-Windows and Windows platforms respectively.
Basic syntax:
Openssl x509-fingerprint-in cerfile.crt
If the file cannot be read, it is very likely that the format is not specified, try the following
Openssl x509-fingerprint-in cerfile.crt-inform PEMopenssl x509-fingerprint-in cerfile.crt-inform DER
If you need to specify to display fingerprint information encoded by SHA1 or SHA256 algorithm, append parameters
Openssl x509-fingerprint-sha1-in cerfile.crtopenssl x509-fingerprint-sha256-in cerfile.crt
Er, it seems that the certutil under the Windows can not output a single item, but can only output all the information together.
Certutil-dump certfile.crt
Well, the "certificate hash (md5):" and "certificate hash (sha1):" in the tail section of certutil-dump output is fingerprint information.