Split PKCS12 public/private keypair into Base64-encoded PEM files (separate) openssl pkcs12 -in certificate.p12 -out servername.crt -clcerts -nokeys openssl pkcs12 -in certificate.p12 -out servername.key -nocerts -nodes openssl rsa -in servername.key -out servername.key Compute the hash of a certificate (HTTPd requires CA certs in folders to be named by hash) openssl x509 -noout -hash -in ca-certificate-file Compute the digest for a server certificate for inclusion in the HTTP Public-Key-Pins header openssl s_client -connect www.example.com:443 | \ openssl x509 -pubkey -noout | \ openssl rsa -pubin -outform der | \ openssl dgst -sha256 -binary | \ openssl enc -base64