From c87f82f0ce58ec714b3e13fbe69c322a0d612c67 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 26 Mar 2020 14:01:38 -0600 Subject: caddytls: Match automation policies by wildcard subjects too https://caddy.community/t/wildcard-snis-not-being-matched/7271/24?u=matt Also use new CertMagic function for matching wildcard names --- modules/caddytls/tls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddytls/tls.go') diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go index 076e017..b2c6324 100644 --- a/modules/caddytls/tls.go +++ b/modules/caddytls/tls.go @@ -329,7 +329,7 @@ func (t *TLS) getAutomationPolicyForName(name string) *AutomationPolicy { return ap // no host filter is an automatic match } for _, h := range ap.Subjects { - if h == name { + if certmagic.MatchWildcard(name, h) { return ap } } -- cgit v1.2.3