This article describes how to create a SSL certificate using OpenSSL and how to setup a HTTPS connection on IIS 7.0 with the created certificate.
IIS7 can import .pfx certificates.
Avoid tutorials that say ‘-des3′ because DES3 is outdated (not secured as others), use RSA instead
Certificate creation using OpenSSL
Download OpenSSL application for Windows:
http://www.openssl.org/related/binaries.html
on Ubuntu:
> sudo apt-get install openssl
Generate a private key and certificate using the command:
> openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout cert.pem -out cert.pem
Country Name (2 letter code) [AU]:SI
State or Province Name (full name) [Some-State]:Slovenia
Locality Name (eg, city) []:Ljubljana
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Avivo d.o.o.
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:example.com
Email Address []:info@example.com
Convert to PKCS#12 (.pfx)
> openssl pkcs12 -export -out cert.pfx -in cert.pem -name “Certificate Friendly Name”
You may have to enter a password several times for private key and generated certificate.
cert.pfx file is created when the procedure is successfully completed.
Also be aware to enter domain name under ‘Common Name’
Set-up HTTPS on IIS
Open IIS Manager (Start -> Run -> inetmgr). Click on the root tree node on the left side and select ‘Server Certificates’ on the right side.

When you click on ‘Server Certificates’ you can see on the far right side. ‘ under ‘Actions’ ‘Import…’ Click on it.

Browse for the generated ‘your_cert.pfx’ file from previous step. Enter the password and click OK.

Certificate now appears on the list.

Back to the IIS tree, right click on a web site and select ‘Edit Bindings…’

Click on ‘Add…’ -> Type = https and choose SSL certificate to your certificate

How to fix IIS problem with multiple certificates
Problem:
On IIS 7 that you can not create more than one HTTPS binding, even though you have more then one SSL certificate and you need HTTPS binding on different hosted websites. If you have one IP address you can bind only one SSL to chosen website. This small application can fix this.
Solution:
Download our mini utility from Codeplex: http://iishttpsbinder.codeplex.com/
How to use:

References:
http://forums.iis.net/t/1117559.aspx
https://www.iis.net/ConfigReference/system.applicationHost/sites/site/bindings


