Wednesday, February 13, 2013

Generate Self Signed Certificate on IIS7 with custom CommonName

It appears that generating a self signed certificate for use with IIS7 is trivial, utilizing the IIS->Server Certificates->Create Self-Signed Certificate wizard. Unfortunately, that wizard will only create a certificate with a CN of the computers FQDN according to Windows. To create on with an alternate CN:

Download the IIS 6.0 Resource Kit.
Run the installer and select to install only the SelfSSL Tool.
Look up the IIS Site ID by clicking Sites in IIS Manager
Open a command prompt and change directory into "C:\Program Files (x86)\IIS Resources\SelfSSL
Execute: SelfSSL.exe / /V:1000 /S:SiteID

Verify certificate exists in IIS Manager->IIS->Server Certificates

Bind to appropriate Site.

Note: Error 0x80092023 indicates you followed other directions that stated the commandline as / instead of /
Expect to receive an error 0x80040154, it can be ignored.

No comments:

Post a Comment