From 052978de5e835f12566fb4ee49315eeb0ef46241 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sat, 10 Dec 2016 00:42:13 +0100 Subject: [PATCH] crypto/tls: expose extension versions in ClientHelloInfo.SupportedVersions --- handshake_server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handshake_server.go b/handshake_server.go index 652e8a1..c725384 100644 --- a/handshake_server.go +++ b/handshake_server.go @@ -901,7 +901,9 @@ func (hs *serverHandshakeState) clientHelloInfo() *ClientHelloInfo { } var supportedVersions []uint16 - if hs.clientHello.vers > VersionTLS12 { + if hs.clientHello.supportedVersions != nil { + supportedVersions = hs.clientHello.supportedVersions + } else if hs.clientHello.vers > VersionTLS12 { supportedVersions = suppVersArray[:] } else if hs.clientHello.vers >= VersionSSL30 { supportedVersions = suppVersArray[VersionTLS12-hs.clientHello.vers:]