fix wildcard certificate creation

certificate created with commonName like *.example.com gets certificate with commonName .example.com
which brings problems to subdomains share one ssl certificate.