In the following command, openssl x509 -in example.crt -hash -noout outputs 8927dc31.
openssl req -out example.crt -keyout example.key -newkey rsa:2048 -nodes -x509 -subj '/C=US/CN=example.com' -days 3650
openssl x509 -in example.crt -hash -noout # 8927dc31
openssl-x509(1) just says it's the "hash" of the subject name.
-subject_hash
Outputs the "hash" of the certificate subject name. This is used in OpenSSL to form an index to allow certificates in a
directory to be looked up by subject name.
-issuer_hash
Outputs the "hash" of the certificate issuer name.
-hash
Synonym for "-subject_hash" for backward compatibility reasons.
- What is the "hash" function? (sha1? md5?)
- What exactly is "the subject name"? (
Subject: C = US, CN = example.cominopenssl x509 -in example.crt -text?) - Can I reproduce the same hash value with the command line?
