]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: make protocol negotiation failure fatal
authorAdam Langley <agl@golang.org>
Tue, 15 Feb 2011 21:38:45 +0000 (16:38 -0500)
committerAdam Langley <agl@golang.org>
Tue, 15 Feb 2011 21:38:45 +0000 (16:38 -0500)
R=r, r2
CC=golang-dev
https://golang.org/cl/4178054

src/pkg/crypto/tls/handshake_client.go

index 19d2bfa3ba74f2d5cf613875720a748d46619dfc..a325a9b953cf9a0d011bc564dfee01667c0286ce 100644 (file)
@@ -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