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

This commit is contained in:
Onur Güzel
2018-09-26 19:16:39 -07:00
committed by Daniel Nelson
parent a086ea6989
commit a21524c6b3
+1
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()