Created
June 3, 2020 11:03
-
-
Save conclusionlogic/efa21f7f9505f4b21d98cc3e7e313b5f to your computer and use it in GitHub Desktop.
[get certificate fingerprint] Extraxt Base64 encoded certificate fingerprint for HPKP #bash #shell #openssl #pinning #hpkp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# from Ceritifcate Signing Requets (for backpup certificate pinning): | |
$ openssl req -pubkey < DOMAIN.csr | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64 | |
# from Public Certificate file (for main certificate pinning): | |
$ cat DOMAIN.crt | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment