To convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM.
openssl pkcs12 -in file-to-convert.pkcs12 -out converted-file.pem -nodes