Tech Tip: Identifying SSL Certificate Encoded Format
PRODUCT: 4D | VERSION: 18 | PLATFORM: Mac & Win
Published On: February 8, 2021
SSL certificates can come in various types of file extensions. 4D only accepts PEM formated certificates and keys. If the received certificate does not have a .pem extension, it is important to be able to identify the format.
Here are the usual file extensions for the following formats.
- PEM format: .pem, .crt, .cer, and .key
- DER format: .cer, .der
- PKCS#7 format: .p7b, .p7c
- PKCS#12 format: .pfx, .p12
To identify if the received certificate is in PEM format:
- Open the certifate in a text editor
- Check if there are "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines
If the certificate has these line, it is in PEM format. The file extension can be changed to .pem. If the certificate does not contain these lines, it needs to be converted to PEM format. OpenSSL commands can be used for the conversion.