openssl convert pem to pfx code example
Example 1: convert pem to crt
openssl x509 -outform der -in your-cert.pem -out your-cert.crt
Example 2: convert p12 to pem
openssl pkcs12 -in mycert.p12 -out ca.pem -cacerts -nokeys
openssl pkcs12 -in mycert.p12 -out client.pem -clcerts -nokeys
openssl pkcs12 -in mycert.p12 -out key.pem -nocerts