Print a warning about wildcard depth in X.509

Fixes #60
This commit is contained in:
Filippo Valsorda
2019-01-06 18:23:59 -05:00
parent 6f4ab38307
commit 0d0636e824

View File

@@ -110,6 +110,13 @@ func (m *mkcert) makeCert(hosts []string) {
}
}
for _, h := range hosts {
if strings.HasPrefix(h, "*.") {
log.Printf("\nReminder: X.509 wildcards only go one level deep, so this won't match a.b.%s ", h[2:])
break
}
}
if !m.pkcs12 {
log.Printf("\nThe certificate is at \"./%s.pem\" and the key at \"./%s-key.pem\" ✅\n\n", filename, filename)
} else {