drop support for Go 1.7

This commit is contained in:
Marten Seemann
2017-06-09 19:42:03 +02:00
parent 14687ee1ec
commit ac63554791
6 changed files with 11 additions and 25 deletions

View File

@@ -102,3 +102,12 @@ func (cc *certChain) getCertForSNI(sni string) (*tls.Certificate, error) {
// If nothing matches, return the first certificate.
return &c.Certificates[0], nil
}
func maybeGetConfigForClient(c *tls.Config, sni string) (*tls.Config, error) {
if c.GetConfigForClient == nil {
return c, nil
}
return c.GetConfigForClient(&tls.ClientHelloInfo{
ServerName: sni,
})
}