Skip to content

Instantly share code, notes, and snippets.

@jiahut
Created July 9, 2016 17:34
Show Gist options
  • Save jiahut/3be347d8bb50e06f4f05375b14c135da to your computer and use it in GitHub Desktop.
Save jiahut/3be347d8bb50e06f4f05375b14c135da to your computer and use it in GitHub Desktop.
#生成 RSA 私钥(传统格式的)
openssl genrsa -out rsa_private_key.pem 1024
#将传统格式的私钥转换成 PKCS#8 格式的
openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt
#生成 RSA 公钥
openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment