I have successfully created and used a self-signed certificate on my development machine (IIS 7.5 - Windows 7).
To do this I generated a self signed cert with a common name (CN) =
app.localhost and imported it into the Trusted Root Certification Authorities store. I then imported the same cert into IIS and bound it to my site with a Host Name =
This worked fine.
Now I am developing an api that runs under
api.localhost. This too needs SSL. So I created a new self-signed cert as before except I specifed a CN =
*.localhost. The new cert was added to the Trusted Root Certification Authorities store and imported into IIS as before. Both sites (
api.localhost) were successfully bound to the wildcard cert.
This did not work.
Chrome complains with:
You attempted to reach api.localhost, but instead you actually reached a server identifying itself as *.localhost.
IE makes a similar complaint.
How do I make a self-signed wildcard certificate that works?