How to export an existing SSL certificate from Windows IIS and reuse it on Linux (convert .PFX to .KEY and .CRT)

1) In Windows, right click on the SSL certificate and export to .PFX

2) On Linux, convert the .PFX file into .CRT, ca_bundle and .KEY file.

openssl pkcs12 -in cert.pfx -nocerts -out cert.key
openssl pkcs12 -in cert.pfx -clcerts -nokeys -out cert.crt
openssl pkcs12 -in cert.pfx -nodes -nokeys -passin pass:mypassword -out ca_bundle.pem

See also: https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/


Was this answer helpful?

 Print this Article

Also Read

Converting .CRT (X.509) to .P7B (PKCS#7) file format

Windows:    Instrunctions for Microsoft Windows (Symantec Knowlegde Base) Linux: openssl...

SSL Installation under Apache and Tomcat 6.0, Tomcat 7.0,Tomcat 8.0

Tomcat 6.x: https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html Tomcat...

How can i verify my SSL certification?

Please use the tools from our SSL Tools site which offer you all kinds of SSL checker tools for...

Configuring Apache with SNI support

https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI

Converting .P7B (PKCS#7) to .PFX / .P12 (PKCS#12) file format

Both PKCS#12 and .PFX also contain a Private Key, which is typically only known by the client...