f you have requested and installed a certificate onto a Windows server using the Internet Information Service (IIS) certificate wizard, you can export that certificate with its private key to a Personal Information Exchange (PFX) file.format.
You can use the open-source utility OpenSSL to perform the conversion from PFX to PEM. You can download a Win32 distribution of OpenSSL here:
http://www.slproweb.com/products/Win32OpenSSL.html
You might also need C++ re-distributable files if you want to use OpenSSL which can be obtained at the following URL:http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
To convert a PFX file to a PEM file, follow these steps on a Windows machine:
- Download and install the Win32 OpenSSL (Win32 OpenSSL v0.9.8i) package from http://www.slproweb.com/products/Win32OpenSSL.html
- Create a folder c:\certs and copy the file yourcert.pfx into the c:\certs folder.
- Open a command prompt and change into the OpenSSL\bin directory:
cd %homedrive%\OpenSSL\bin
- Type the following command to convert the PFX file to an unencrypted PEM file (all on one line):
openssl pkcs12 -in c:\certs\yourcert.pfx -out c:\certs\cag.pem –nodes