crypto/tls: make protocol negotiation failure fatal

R=r, r2
CC=golang-dev
https://golang.org/cl/4178054
This commit is contained in:
Adam Langley 2011-02-15 16:38:45 -05:00
parent f14c29a311
commit a0c3b96065

View 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