aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2015-11-08 19:10:14 -0800
committerAdam Langley <agl@golang.org>2015-11-09 23:09:48 +0000
commita4dcc692011bf1ceca9b1a363fd83f3e59e399ee (patch)
tree91e28169c78c03656d479a885ccd52bbc7511b96 /src/encoding
parent712ffc0861cd6ec425736422415bf650c6cb013f (diff)
downloadgo-a4dcc692011bf1ceca9b1a363fd83f3e59e399ee.tar.xz
crypto/tls: don't send IP literals as SNI values.
https://tools.ietf.org/html/rfc6066#section-3 states: “Literal IPv4 and IPv6 addresses are not permitted in "HostName".” However, if an IP literal was set as Config.ServerName (which could happen as easily as calling Dial with an IP address) then the code would send the IP literal as the SNI value. This change filters out IP literals, as recognised by net.ParseIP, from being sent as the SNI value. Fixes #13111. Change-Id: Ie9ec7acc767ae172b48c9c6dd8d84fa27b1cf0de Reviewed-on: https://go-review.googlesource.com/16742 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Adam Langley <agl@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions