Trích xuất Hash Public Key
Câu lệnh lấy hash public key từ một web domain:
openssl s_client -servername <domain> -connect <domain:port> | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
Câu lệnh lấy hash public key từ một chứng chỉ trong file pem:
openssl x509 -in new_wildcard.abc.com.fullchain.pem -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
Trích xuất SHA-256 FINGERPRINT
Câu lệnh lấy SHA-256 fingerprint từ một web domain:
openssl s_client -connect <host>:<port> < /dev/null 2>/dev/null | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
Câu lệnh lấy SHA-256 fingerprint từ một chứng chỉ trong file pem:
openssl x509 -fingerprint -sha256 -noout -in new_wildcard.abc.com.fullchain.pem