mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
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:
parent
abdf13ea30
commit
98bba33861
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user