Is there a way how to convert certificates between cer/pem/crt/der/pfx/p12 in Linux? I have an SSL certificate in a .cer file and I need it to be .pem in order to use it.
How can I convert it?
Is there a way how to convert certificates between cer/pem/crt/der/pfx/p12 in Linux? I have an SSL certificate in a .cer file and I need it to be .pem in order to use it.
How can I convert it?
Converting certificates between cer/pem/crt/der/pfx/p12 can be done in Linux with the use of OpenSSL tool via the terminal.
These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software.
Convert a DER file (.crt .cer .der) to PEM
Convert a PEM file to DER
Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
You can add -nocerts to only output the private key or add -nokeys to only output the certificates.
Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)
For more information see:
Convert .crt to .p12
openssl pkcs12 -export -out server.p12 -inkey server.key -in server.crt
Where server.key , is the server key . server.crt is cert file from CA or self sigh
We can easily export .cer file of a https url by using google chrome browser. Just click on the padlock icon and export the key file as a base64 based .cer file
Reference
http://uncaughterror.com/programming/ionic3/how-to-integrate-ssl-in-ionic-3-using-cordova-plugin/
https://www.youtube.com/watch?v=6nLK9wJPNRE
Doing the same using a linux machine
Convert .pem file into .cer file