mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-07 14:35:23 -04: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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user