summaryrefslogtreecommitdiff
path: root/modules/caddytls/tls.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-26 14:01:38 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-26 14:01:38 -0600
commitc87f82f0ce58ec714b3e13fbe69c322a0d612c67 (patch)
treeeac26618f7cbaa90f510585ebfe593151adf6d70 /modules/caddytls/tls.go
parent5c55e5d53fcd5f60921dc477a4eb2127fe20c577 (diff)
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
Diffstat (limited to 'modules/caddytls/tls.go')
-rw-r--r--modules/caddytls/tls.go2
1 files changed, 1 insertions, 1 deletions
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
}
}