SSL Certificate format conversion-HTTPS SSL tutorial
SSL Certificate format conversion-HTTPS SSL tutorial
Convert CER/CRT to PEM
These two formats of certificates can be converted by directly modifying the certificate file extension, such as renaming "server.crt" to "server.pem" directly.
Convert PFX to PEM
The PFX format generally appears in windows server and can be converted by the openssl command.
Extract the private key: openssl pkcs12-in certname.pfx-nocerts-out key.pem-nodes
Extraction certificate: openssl pkcs12-in certname.pfx-nokeys-out cert.pem
Convert P7B to PEM
The P7B format generally appears in windows server and tomcat and can be converted by the openssl command.
Certificate conversion: openssl pkcs7-print_certs-in incertificat.p7b-out outcertificate.cer
Obtain the content of [--BEGIN CERTIFICATE--,-- END CERTIFICATE--] in outcertificat.cer, save it in pem format and upload it as a certificate.
Private key conversion: no private key
Convert DER to PEM
The DER format generally appears on the java platform.
Certificate conversion: openssl x509-inform der-in certificate.cer-out certificate.pem
Private key conversion: openssl rsa-inform DER-outform PEM-in privatekey.der-out privatekey.pem
The converted certificate file (* .pem) should be in a format similar to the following (can be opened using a text editor such as notepad++):
Global trusted CA institutions