p12转pem公钥私钥

cer格式证书生成p12文件,前面写了有一篇了。
这里是从p12文件导出公钥和私钥node

 

//1.生成1.key文件
openssl pkcs12 -in apple_payment.p12 -nocerts -nodes -out 1.key
//2.导出私钥
openssl rsa -in 1.key -out apple_pay_pri.pem
writing RSA key
//3.导出公钥
openssl rsa -in 1.key -pubout -out apple_pay_pub.pem