handshake: set MinVersion on the Config returned by GetConfigForClient (#4134)

This commit is contained in:
Marten Seemann
2023-10-27 12:35:07 +07:00
committed by GitHub
parent d309060cde
commit ef800d6f71
2 changed files with 10 additions and 1 deletions

View File

@@ -148,6 +148,8 @@ func addConnToClientHelloInfo(conf *tls.Config, localAddr, remoteAddr net.Addr)
c, err := gcfc(info)
if c != nil {
c = c.Clone()
// This won't be necessary anymore once https://github.com/golang/go/issues/63722 is accepted.
c.MinVersion = tls.VersionTLS13
// We're returning a tls.Config here, so we need to apply this recursively.
addConnToClientHelloInfo(c, localAddr, remoteAddr)
}