Formats
PEM Format
- Encoded in Base64 ASCII.
- Requires separate files for certificates and private keys.
- Common extensions: .cer, .crt, .pem, .key.
DER Format
- A binary format of certificates.
- Lacks the "BEGIN/END CERTIFICATE" statements found in PEM files.
- Common extensions: .cer, .der.
- Often used with Java platforms.
P7B/PKCS#7 Format
- Stored in Base64 ASCII, with extensions .p7b or .p7c.
- Contains only certificates and chain certificates, excluding the private key.
- Supported by Microsoft Windows and Java Tomcat.
PFX/P12/PKCS#12 Format
- A binary format that encapsulates server certificates, intermediate certificates, and private keys in one file.
- Extensions: .pfx, .p12.
- Mainly used on Windows for certificate import and export.
Converting Formats
PEM conversions are essential for compatibility:
-
x509 to PEM
-
PEM to DER
-
DER to PEM
-
PEM to P7B
-
PKCS7 to PEM
-
PFX to PEM
-
PFX to PKCS#8
- Convert PFX to PEM
- Convert PEM to PKCS8
-
P7B to PFX
- Convert P7B to CER
- Convert CER and Private Key to PFX
Types of certificates
Self-signed
Wildcard
*.domain.local
will secure anything.domain.local
but not a multi-level subdomain like something.somethingelse.domain.local