HOWTO: Convert PFX/PKCS#12 for use with HMS

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
prisma
Senior user
Senior user
Posts: 309
Joined: 2010-07-09 13:16

HOWTO: Convert PFX/PKCS#12 for use with HMS

Post by prisma » 2010-09-15 17:24

You should have received a *.pfx file from your CA. If you only have the certificate in you certificate store, you can export it with certmgr.msc. Check "export privat key". Now you can convert this PKCS#12 file to a PEM-file with:

openssl pkcs12 -in yourfile.pfx -out yournewfile.pem -nodes

Then you have a PEM-File including 2 sections:

-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

and

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

Split this file with an editor into 2 separated files, named yournewfile.key and yournewfile.cer. Remove all extra text from these files outside the lines with the dashes.

Now you can use the files with HMS

Post Reply