HOWTO convert PEM certificates and keys to DER format for emSSL

From SEGGER Wiki
Jump to navigation Jump to search

emSSL requires server certificates and private keys in DER format. Some certificate providers deliver certificates in PEM format which is not immediately compatible with emSSL. You can convert certificates using OpenSSL.

To convert a PEM certificate to a DER certificate

openssl x509 -inform pem -in Certificate.pem -outform der -out Certificate.der

To convert a PEM private key to a DER private key

openssl rsa -inform pem -in PrivateKey.pem -outform der -out PrivateKey.der