CompileNix's Blog - alias get-hpkp-pin

Start Page | RSS Feed | Find Stuff

Generate HPKP-Pin from a PEM file or any shell piped content.


alias get-hpkp-pin='openssl x509 -pubkey -noout | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64'

Usage example: cat cert.pem | get-hpkp-pin