make sure the same session ticket key is used if none is configured

This commit is contained in:
Marten Seemann
2019-03-29 08:53:22 +01:00
parent 2adf923ee6
commit a6d1917417
2 changed files with 11 additions and 0 deletions

View File

@@ -70,6 +70,9 @@ func tlsConfigToQtlsConfig(
if c == nil {
c = &tls.Config{}
}
// Clone the config first. This executes the tls.Config.serverInit().
// This sets the SessionTicketKey, if the user didn't supply one.
c = c.Clone()
// QUIC requires TLS 1.3 or newer
minVersion := c.MinVersion
if minVersion < qtls.VersionTLS13 {