There are different formats of certificate files for different platforms.
This format is most often used by certificate authorities. PEM certificates most often have the extension .pem, .crt, .cer, or .key. They are encrypted using Base64 and contain the strings —–BEGIN CERTIFICATE—– and —–END CERTIFICATE—–.
Apache and other similar servers use this format of certificates. Multiple PEM certificates and even a private key can be included in one file, one under the other. But most servers, such as Apache, expect the certificate and private key to be in different files.
PKCS#7 or P7B certificates are usually saved in Base64 ACVII format and have the extension .p7b or .p7c. A P7B certificate contains the strings —–BEGIN PKCS7—– and —–END PKCS7—–. This format contains only the certificate and the certificate chain, but not the private key. Several platforms support this format, including Microsoft Windows and Java Tomcat.
PKCS#12 or PFX format is a binary format for storing the certificate, any intermediate certificates and private key in one encrypted file. PFX files are typically saved with a .pfx or .p12 extension. Typically this format is used on Windows certificates to export/import certificate and private key.