Add hostname to TLS config for SNI support (#4747)

This commit is contained in:
Onur Güzel 2018-09-27 05:16:39 +03:00 committed by Daniel Nelson
parent a086ea6989
commit a21524c6b3
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ func (c *X509Cert) getCert(location string, timeout time.Duration) ([]*x509.Cert
}
defer ipConn.Close()
tlsCfg.ServerName = u.Host
conn := tls.Client(ipConn, tlsCfg)
defer conn.Close()