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