使用OpenSSL转换X509 PEM与PFX证书
X509转PFX:
openssl pkcs12 -export -inkey test.key -in test.cer -out test.pfx
PFX转X509:
openssl pkcs12 -in test.pfx -nodes -out test.pem
openssl rsa -in test..pem -out test.key
openssl x509 -in test..pem -out test.crt
X509转PFX:
openssl pkcs12 -export -inkey test.key -in test.cer -out test.pfx
PFX转X509:
openssl pkcs12 -in test.pfx -nodes -out test.pem
openssl rsa -in test..pem -out test.key
openssl x509 -in test..pem -out test.crt