生成原始rsa私钥文件:
openssl genrsa -out rsa_private_key.pem 1024
将原始的rsa私钥转换未pkcs8格式(即生成私钥文件):
openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out private_key.pem
由原始的rsa私钥文件生成公钥文件:
openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem