Commit 896dc6bc authored by Matthew Holt's avatar Matthew Holt

tls: Try empty name if no matches for getting config during handshake

See discussion on #2015; the initial change had removed this check, and
I can't remember why I removed it or if it was accidental. Anyway, it's
back now.
parent be96cc0e
......@@ -59,6 +59,14 @@ func (cg configGroup) getConfig(name string) *Config {
}
}
// try a config that serves all names (this
// is basically the same as a config defined
// for "*" -- I think -- but the above loop
// doesn't try an empty string)
if config, ok := cg[""]; ok {
return config
}
// no matches, so just serve up a random config
for _, config := range cg {
return config
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment