Sometimes the Certificate Authority that issued your SSL certificate send it in a file-type that isn't compatible with your server. Fortunately, this can be easily fixed. Whether you're dealing with DER, PKCS#7, P7B, PKCS#12 or PFX format, it's easy to convert.
Converting your SSL certificate from one type to another is a super-easy task. You just have to run a few OpenSSL commands and voila!
openssl x509 -outform der -in certificate.pem -out certificate.der
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
DER a binary form of PEM. It has extension .der or .cer. DER is typically used with Java platforms.
openssl x509 -inform der -in certificate.cer -out certificate.pem
P7B formatted file is usually stored in Base64 format and has extension .p7b or .p7c. Files in this format contain lines "-----BEGIN PKCS7-----" and "-----END PKCS7-----". This format is just for certificates, not for private keys.
PKCS#7 and P7B are installed on Microsoft Windows and Java Tomcat servers.
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer
PFX is a binary format storing the server certificate, intermediates certificates, and private key in one file. It usually has the extension .pfx or .p12. Typically, these are used on Windows machines.
When converting PFX format to PEM, one file will include all certificates and the private key.
To separate it, you need to open this file in a simple text editor, copy every single part (with BEGIN and END lines) to different files and save it as certificate.cer, CACert.cer and privatekey.key.
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes
Friendly Tip: One of the most common support issues we handle is SSL certificates being sent in the wrong format. This isn't like a mac OS vs. Windows issue. The files can be converted.
With decades of SSL support experience between them all, our team of SSL experts is always available to assist you.