Download and install Win64/Win32 OpenSSL first
The Win64/Win32 OpenSSL Installation Project is dedicated to providing a simple installation of OpenSSL for Microsoft Windows. It is easy to set up and easy to use through the simple, effective installer. No need to compile anything or jump through any hoops, just click a few times and it is installed, leaving you to doing real work.
- Conversion of CRT file to PEM file
- Execute the following commands to convert an .crt file to a .pem file:
openssl x509 -in input.crt -out input.der -outform DER
openssl x509 -in input.der -inform DER -out output.pem -outform PEMBAT (Batchfile)- Convert PFX file to PEM file
- Conversion to a combined PEM file
- To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:
openssl pkcs12 -in input.pfx -out cert.pem -nodesBAT (Batchfile)- Conversion to separate PEM files
- Extract the private key form a PFX to a PEM file with this command:
openssl pkcs12 -in input.pfx -nocerts -out key.pemBAT (Batchfile)- Exporting the Certificate ONLY:
openssl pkcs12 -in input.pfx -clcerts -nokeys -out cert.pemBAT (Batchfile)- Removing the password from the extracted Private Key:
openssl rsa -in key.pem -out server.keyBAT (Batchfile)- Check the PEM Key
openssl rsa -in key.pem -checkBAT (Batchfile)
Leave a Reply