Skip to content

Commit

Permalink
getlantern/lantern#1941 Actually not sending ServerName when sendServ…
Browse files Browse the repository at this point in the history
…erName is false
  • Loading branch information
oxtoacart committed Nov 3, 2014
1 parent e94cf53 commit 40b0002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tlsdialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func DialForTimings(dialer *net.Dialer, network, addr string, sendServerName boo

if !sendServerName && err == nil && !config.InsecureSkipVerify {
log.Trace("Manually verifying certificates")
err = verifyServerCerts(conn, serverName, configCopy)
err = verifyServerCerts(conn, serverName, config)
}
if err != nil {
log.Trace("Handshake or verification error, closing underlying connection")
Expand Down
2 changes: 1 addition & 1 deletion tlsdialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestOKWithServerName(t *testing.T) {
func TestOKWithoutServerName(t *testing.T) {
config := &tls.Config{
RootCAs: cert.PoolContainingCert(),
ServerName: "localhost",
ServerName: "localhost", // we manually set a ServerName to make sure it doesn't get sent
}
_, err := Dial("tcp", ADDR, false, config)
if err != nil {
Expand Down

0 comments on commit 40b0002

Please sign in to comment.