Articles in Root

Converting Certificate Formats

Solution

QuoVadis provides a PKI Widget to help convert certificates between the DER, PEM, and PKCS#7 /P7B formats.  

For more information, please see https://pkiwidgets.quovadisglobal.com/pkiwidgets/convertCert.aspx

PEM Format
PEM files are Base64 encoded ASCII and contain "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" statements. Both digital certificates and private keys can be in PEM format. PEM files usually end with .pem, .crt, .cer, or .key. Multiple PEM certificates and private keys, may be included in one file, one below the other. However, many platforms, such as Apache, require the certificates and private key to be in separate files.

DER Format
DER files are in binary format. They usually end with .der or .cer, so to differentiate between DER.cer and PEM.cer files, you may need to use a text editor to look at the BEGIN/END statements. Both digital certificates and private keys can be encoded in DER format. DER is typically used with Java platforms. The QuoVadis tool can only convert certificates to DER format. You should use OpenSSL if you need to convert a private key to DER.

PKCS#7/P7B Format
The PKCS#7 or P7B format is usually stored in Base64 ASCII format using the .p7b or .p7c file extensions. P7B certificates contain "-----BEGIN PKCS7-----" and "-----END PKCS7-----" statements. P7B files only contain certificates, not the private key. Several platforms support P7B files including Microsoft Windows and Java Tomcat.