Classic Load Balancer (CLB) supports only PEM certificates. Certificates in other formats must be converted to the PEM format before they can be uploaded to CLB. We recommend that you use OpenSSL to convert certificate formats.
Convert a certificate from DER to PEM
DER: This format is usually used on the Java platform. In most cases, the certificate file suffix is .der, .cer, or .crt.
Run the following command to convert the certificate format:
openssl x509 -inform der -in certificate.cer -out certificate.pem
Run the following command to convert the private key:
openssl rsa -inform DER -outform PEM -in privatekey.der -out privatekey.pem
Convert a certificate from P7B to PEM
P7B: This format is usually used in Windows Server and Tomcat.
Run the following command to convert the certificate format:
openssl pkcs7 -print_certs -in incertificate.p7b -out outcertificate.cer
Convert a certificate from PFX to PEM
PFX: This format is usually used in Windows Server.
Run the following command to extract the certificate:
openssl pkcs12 -in certname.pfx -nokeys -out cert.pem
Run the following command to extract the private key:
openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes