Export SSL certificate from Windows to Linux using OpenSSL


So, if you want to import a SSL certificate from a Windows server to Linux without re-keying the cert..

These are the steps using OpenSSL:

1. Export certificate with the private key in PFX format (from windows server).
2. On a Linux server, transform certificate to PEM format: openssl pkcs12 -in certname.pfx -nokeys -out cert.pem
3. Extract private key: openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes
4. Remove password: openssl rsa -in key.pem -out server.key
5. Paste private keystring at the end of the certificate from CA, so that it contains both the cert and the private key
This should have the following format




priv key…



Any txt fileextension or similar should work

6. Import certificate.


I have testet this successfully on CentOS today, actually on the fantastic Symantec Messaging Gateway (Brightmail)

-which in my opinion is the best in-house antispam filter solution available,


And by the way

!!Stay clear of the crypto viruses out there!!

-its coming in more and more flavours. Do yourself and your company a big  favour and Watch out  for the unknown email attachments!!!


Cryptolocker-Virus-Magnifying glass image

More articles

DISM repair Windows Server 2016

Repair Windows Server 2016 with DISM dism /online /cleanup-image /scanhealth dism /online /cleanup-image /checkhealth dism /online /cleanup-image /restorehealth /source:WIM:d:sourcesinstall.wim:2 /limitaccess sfc

Read More »