Better HN
topnewbestaskshowjobs
Log inSign up

gt99

1 karma · joined Jan 4, 2016 (10y ago) · 4 submissions

Submissions

comment 10y ago · link · parent

I just sent you an email, I have two more.

comment 10y ago · link · parent

Thanks! And thanks for the article! Lots of great shortcuts, they all made it to my .bashrc ;)

comment 10y ago · link · parent

Yup, exactly. :)

Would probably be more verbose if named:

openssl-key-to-hpkp-pin

openssl-website-to-hpkp-pin

comment 10y ago · link · parent

function openssl-key-to-pin() { openssl rsa -in "${1}" -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 }

function openssl-website-to-pin() { openssl s_client -connect ${1}:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 }