Run the following command format from the OpenSSL installationbin folder. Convert P7B to PEM. cat private-key.pem cert.pem > cert-with-private-key. openssl x509 -inform der -in certificate.cer -out certificate.pem. OpenSSL Convert X509/PEM. openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer. openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt. In all of the examples shown below, substitute the names of the files you are actually working with for INFILE.p12, OUTFILE.crt, and OUTFILE.key.. View PKCS#12 Information on Screen. Convert DER to PEM. To Export Certificate from the Pfx file to .PEM file – openssl pkcs12 -in mycert.pfx -nokeys -out cert.pem Remove the Passphrase from Key.Pem File (Optional) – Converting PKCS #7 (P7B) and private key to PKCS #12 / PFX. OpenSSL Convert DER. openssl pkcs12 -in /path/to/PKCS12.pfx -nocerts -out privatekey.pem openssl pkcs12 -in /path/to/PKCS12.pfx -clcerts -nokeys -out publiccert.pem Notes: 1) The first command will request the password that was used to encrypt the PKCS#12 certificate. The exact command was c:\opensslui_1_2\openssl>o penssl pkcs12 -export -out Name_here.pfx -inkey PrivateKeyName.key -in Cert_Name.crt 4). The command below works but then you are prompted to enter and reenter a password. openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer. OpenSSL Convert P7B. Feel free to leave this blank. openssl pkcs12 -info -in INFILE.p12 -nodes It will then request and confirm a new password to encrypt the private key file, privatekey.pem. Download and install version 1.0.1p. openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt. openssl pkcs12-export-out / tmp / wildcard.pfx-inkey privkey.pem-in cert.pem-certfile chain.pem The exported wildcard.pfx can be fund in the /tmp directory. openssl pkcs12 -export -out Cert.p12 -in cert.pem -inkey key.pem -passin pass:root -passout pass:root. Procedure. To dump all of the information in a PKCS#12 file to the screen in PEM format, use this command:. openssl pkcs12 -export -in "$pem" -inkey "$key" -out "$pfx" -passout pass:pkcs12 "$pfxpass"; The above does not work for me. But the other tech stored the files in that same folder and the exported .pfx file was out put in that folder as well. Convert PEM to PFX. Reader Interactions Converting PEM encoded Certificate and private key to PKCS #12 / PFX. Convert P7B to PFX IBM has this on their website. openssl pkcs12 -in [yourfilename.pfx] -nocerts -out [keyfilename-encrypted.key] This command will extract the private key from the .pfx file . Now we need to type the import password of the .pfx file. And then using OpenSSL to create a PFX file: openssl pkcs12 -export -inkey private-key.pem -in cert-with-private-key -out cert.pfx. Go to https://www.openssl.org/community/binaries.html. A full certificate chain = public certificate + intermediate certificate + root certificate contained in a single file. Convert PEM & Private Key to PFX/P12: openssl pkcs12 -export -out certificate.pfx -inkey privatekey.pem -in certificate.pem -certfile CACert.pem. OpenSSL will ask you to create a password for the PFX file. Create a pkcs12 (.pfx or .p12) from OpenSSL files (.pem , .cer, .crt, ...) You have a private key file in an openssl format and have received your SSL certificate.