Created
October 25, 2020 13:08
-
-
Save ivarkol/32efe72e8bbf83bb88b58990b65df9ad to your computer and use it in GitHub Desktop.
Generate key pair with openssl
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
openssl genrsa -out keypair.pem 2048 | |
To extract the public part, use the rsa context: | |
openssl rsa -in keypair.pem -pubout -out publickey.crt | |
Finally, convert the original keypair to PKCS#8 format with the pkcs8 context: | |
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in keypair.pem -out pkcs8.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment