Create SSL certificate for IIS

Quick How to for reminding my self how to create an SSL certificate for a IIS website.

First of all we need to install openssl, which can be found here -> OpenSsl

After the download finished, extract the source download your public certificate key and private key which are needed to generate the correct certificate form them.

Open up CMD, not powershell, with elevated rights and got to the path where both public and private key files are.

"C:\Program Files (x86)\GnuWin32\bin\openssl" pkcs12 -export -out "certificate_combined.pfx" -inkey "private.key" -in "certificate.crt" -certfile ca_bundle.crt

Follow the instructions from the commad prompt.

Next open up IIS manager, on the right side click on your serve and then on the left side from the Icons search for “Server certficates”. New windows is opend and from the right side “Action” menu choose import. Now choose the path for the .pfx file type in the password you added previous step and click done.

After the certificate is added successfully you can edit your site binding for it to the correct certificate on https binding.