Lower-case server name for good measure

This already happens in the getCertificate function, but doing it here
guarantees case insensitivity across the board for this handshake.
This commit is contained in:
Matthew Holt
2016-09-08 18:49:21 -06:00
parent abdf13ea30
commit 98bba33861
+1 -1
View File
@@ -59,7 +59,7 @@ func (cg configGroup) getConfig(name string) *Config {
//
// This method is safe for use as a tls.Config.GetCertificate callback.
func (cg configGroup) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
cert, err := cg.getCertDuringHandshake(clientHello.ServerName, true, true)
cert, err := cg.getCertDuringHandshake(strings.ToLower(clientHello.ServerName), true, true)
return &cert.Certificate, err
}