- 终端: 输入openssl
2.生成一个1024位的私钥:
genrsa -out rsa_private_key.pem 1024
- 利用私钥生成JAVA支持的PKCS8类型的私钥:
pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out rsa_private_key_pkcs8.pem
4.生成公钥:
rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem