June 06
IIS and SSL Certificates
I was working on a project involving multiple websites using SSL. I needed to set up two websites in a single IIS instance and generate corresponding test certificates. The standard tool to generate test certificates is
SelfSSL but it
contains a bug wherein only the last test certificate is useable. There is, however, a fixed version in the IIS Diagnostics Tools.
To generate test SSL certificates, follow these steps:
- Install the IIS Diagnostics Tools. The package includes the SSL Diagnostics tool, which includes the functionality of SelfSSL.
- Identify the web site identifier by examining the Web Sites node in the IIS Manager.
- Open a command prompt to the IIS Diagnostics Tools/SSLDiag folder. Here is a sample command-line:
ssldiag /selfssl /V:365 /N:CN=www.point2.com /S:1834870997
- Repeat as necessary.
It is a little-known fact that, starting with Windows Server 2003 SP1, IIS +can+ use host headers in an SSL scenario. The limitation is that the IIS snap-in does not support it, so a metabase edit is necessary.
Here are the instructions.
Hope this helps!