From a0c3b96065e6291cab072eb526ac4c49c6d06aa3 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Tue, 15 Feb 2011 16:38:45 -0500 Subject: [PATCH] crypto/tls: make protocol negotiation failure fatal R=r, r2 CC=golang-dev https://golang.org/cl/4178054 --- src/pkg/crypto/tls/handshake_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/crypto/tls/handshake_client.go b/src/pkg/crypto/tls/handshake_client.go index 19d2bfa3ba7..a325a9b953c 100644 --- a/src/pkg/crypto/tls/handshake_client.go +++ b/src/pkg/crypto/tls/handshake_client.go @@ -57,7 +57,7 @@ func (c *Conn) clientHandshake() os.Error { vers, ok := mutualVersion(serverHello.vers) if !ok { - c.sendAlert(alertProtocolVersion) + return c.sendAlert(alertProtocolVersion) } c.vers = vers c.haveVers = true