p12 certificate to pem code example
Example 1: convert pem to private key openssl
openssl rsa -outform der -in private.pem -out private.key
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