SSL Certificate File Types

Certificates can be stored in a variety of file formats -- which can be a pain, since the format that your certificates come in may not be the format that is compatible with your end goal.

In general, there are three different kinds of file formats -- PEM, PKCS, and DER.

PEM Format

Properties

PEM files are generally associated with the UNIX world, and have the following properties:

  • usually stored with file extensions like .pem, .key, .crt
  • are ASCII files (not binary)
  • contain textual "BEGIN" and "END" Statements
  • Can describe private keys, single certificates, and/or certificate chains
  • Default format for OpenSSL

Compatibility

  • Apache consumes PEM files for SSL encryption

Translation

PFX (PKCS #12) Format

Properties

  • Most common on Microsoft filesystems
  • usually have file extensions like .pfx or .p12
  • binary format

Compatibility

  • One of the only ways to import a private key into a Microsoft Windows Certificate Store

Translation

DER Format

Properties

  • Used commonly with Java Keystores
  • Default format for most browsers

Compatibility

  • Import into a Java Keystore for use with Tomcat

Translation