fix the server's 0-RTT rejection logic when using GetConfigForClient (#4550)

This commit is contained in:
Marten Seemann
2024-06-03 18:42:58 +08:00
committed by GitHub
parent dea2eafd1d
commit 459a6f3df9
7 changed files with 196 additions and 193 deletions

View File

@@ -94,6 +94,10 @@ func ConfigureTLSConfig(tlsConf *tls.Config) *tls.Config {
if config == nil {
return nil, nil
}
// Workaround for https://github.com/golang/go/issues/60506.
// This initializes the session tickets _before_ cloning the config.
_, _ = config.DecryptTicket(nil, tls.ConnectionState{})
config = config.Clone()
config.NextProtos = []string{proto}
return config, nil