The PKCS #12
file with .pfx or .p12 extension is an archive file format for storing many cryptography objects, including a private key with its X.509 certificate.
openssl pkcs12 -in certificate.pfx -nocerts -out private-key.pem -nodes
openssl pkcs12 -in certificate.pfx -nokeys -out certificate.pem
Resources: