Convert your SSL file to other formats
If your server/device requires a different certificate format other than Base64 encoded X.509, a third party tool such as OpenSSL can be used to convert the certificates into the appropriate format.
OpenSSL commands to convert PEM formatted file
Convert PEM to DER
Convert PEM to P7B
Convert PEM to PFX
OpenSSL commands to convert DER formatted file
Convert DER to PEM
OpenSSL commands to convert P7B formatted file
Convert P7B to PEM
Convert P7B to PFX
OpenSSL commands to convert PFX formatted file
Convert PFX to PEM
If your server/device requires a different certificate format other than Base64 encoded X.509, a third party tool such as OpenSSL can be used to convert the certificates into the appropriate format.
OpenSSL commands to convert PEM formatted file
Convert PEM to DER
Code:
openssl x509 -outform der -in certificate.pem -out certificate.der
Convert PEM to P7B
Code:
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
Convert PEM to PFX
Code:
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
Convert DER to PEM
Code:
openssl x509 -inform der -in certificate.cer -out certificate.pem
Convert P7B to PEM
Code:
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
Convert P7B to PFX
Code:
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer
Convert PFX to PEM
Code:
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes
Comment