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