i almost went down this route, then realized I could avoid all this R&D and just pay $40 for a wildcard cert.
Here's where I got mine, works great.
Important though, for compatability with firefox and some other browsers, you'll need to copy the intermediate cert to the end of the cert file. it works fine with 2 certs in the file, just put the intermediate at the end.