]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: return a typed error on invalid record headers
authorCaleb Spare <cespare@gmail.com>
Tue, 20 Oct 2015 07:23:11 +0000 (00:23 -0700)
committerAdam Langley <agl@golang.org>
Mon, 16 Nov 2015 21:54:44 +0000 (21:54 +0000)
commit45d1c8ab59cd08ef4a7976f44c8c19ed53b118f8
treed2dbbd3d61c45d3e51b2498e126c07a3b21121b2
parentbf5b4e71be59d90f35a571a644e5731c581e9f6c
crypto/tls: return a typed error on invalid record headers

The user can inspect the record data to detect that the other side is
not using the TLS protocol.

This will be used by the net/http client (in a follow-on CL) to detect
when an HTTPS client is speaking to an HTTP server.

Updates #11111.

Change-Id: I872f78717aa8e8e98cebd8075436209a52039a73
Reviewed-on: https://go-review.googlesource.com/16078
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/tls/conn.go