Các câu lệnh phục vụ certpinning

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

Published by Nhat Truong

Hi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: