Created
December 4, 2023 13:57
-
-
Save kristofer84/5a4320c5751e44b7fded39a617d619cc to your computer and use it in GitHub Desktop.
Create files needed for signing and verifying JWT
This file contains 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
# npm install -g eckles | |
openssl ecparam -genkey -name prime256v1 -out private_key.pem | |
openssl ec -in private_key.pem -pubout -out public_key.pem | |
eckles public_key.pem > public_key.jwk | |
openssl req -x509 -key private_key.pem -subj /CN=localhost -days 1000 > certificate.pem | |
echo $(openssl x509 -in certificate.pem -fingerprint -noout) | sed 's/SHA1 Fingerprint=//g' | sed 's/://g' | xxd -r -ps | base64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment