From 0d0636e82470193b0d186c749e352f201b78b076 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sun, 6 Jan 2019 18:23:59 -0500 Subject: [PATCH] Print a warning about wildcard depth in X.509 Fixes #60 --- cert.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cert.go b/cert.go index 055e274..52068db 100644 --- a/cert.go +++ b/cert.go @@ -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 {