*: fix golangci-lint warnings

This commit is contained in:
Andrey Meshkov
2020-04-05 18:34:43 +03:00
parent d5b826e12f
commit 7b8588afa4
12 changed files with 86 additions and 82 deletions

View File

@@ -407,7 +407,7 @@ func matchDNSName(dnsNames []string, sni string) bool {
func (s *Server) onGetCertificate(ch *tls.ClientHelloInfo) (*tls.Certificate, error) {
if s.conf.StrictSNICheck && !matchDNSName(s.conf.dnsNames, ch.ServerName) {
log.Info("DNS: TLS: unknown SNI in Client Hello: %s", ch.ServerName)
return nil, fmt.Errorf("Invalid SNI")
return nil, fmt.Errorf("invalid SNI")
}
return &s.conf.cert, nil
}