Localhost SSL testing on Win XP(IIS 5+) for free
If you are using IIS 6.0 and need to install a certificate for testing or internal use, you can do it in about 2 seconds with the use of the SelfSSL utility from the IIS 6 Resource Kit. Just type SelfSSL at the command line and it will instantly install a self-signed certificate on the default web site. You can install a certificate on other sites and control the contents of the certificate including the common name and expiration date using command-line switches. See the SelfSSL documentation for exact details.
If you are not using IIS 6 yet, then you can use the SSLDiag tool available from the Microsoft Download Center. Be sure to download the full setup.exe package in order to get the SSLDiag documentation. To install a certificate on a web site, right-click the Web site level (shown by [W3SVC/
You can find the original page with all this and more here