remove unused function parameter from qtls.SetupConfigForServer (#4549)

This commit is contained in:
Marten Seemann
2024-06-03 15:12:12 +08:00
committed by GitHub
parent 73a5370f3c
commit dea2eafd1d
3 changed files with 3 additions and 3 deletions

View File

@@ -124,7 +124,7 @@ func NewCryptoSetupServer(
cs.allow0RTT = allow0RTT cs.allow0RTT = allow0RTT
quicConf := &tls.QUICConfig{TLSConfig: tlsConf} quicConf := &tls.QUICConfig{TLSConfig: tlsConf}
qtls.SetupConfigForServer(quicConf, cs.allow0RTT, cs.getDataForSessionTicket, cs.handleSessionTicket) qtls.SetupConfigForServer(quicConf, cs.getDataForSessionTicket, cs.handleSessionTicket)
addConnToClientHelloInfo(quicConf.TLSConfig, localAddr, remoteAddr) addConnToClientHelloInfo(quicConf.TLSConfig, localAddr, remoteAddr)
cs.tlsConf = quicConf.TLSConfig cs.tlsConf = quicConf.TLSConfig

View File

@@ -8,7 +8,7 @@ import (
"github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/quic-go/internal/protocol"
) )
func SetupConfigForServer(qconf *tls.QUICConfig, _ bool, getData func() []byte, handleSessionTicket func([]byte, bool) bool) { func SetupConfigForServer(qconf *tls.QUICConfig, getData func() []byte, handleSessionTicket func([]byte, bool) bool) {
conf := qconf.TLSConfig conf := qconf.TLSConfig
// Workaround for https://github.com/golang/go/issues/60506. // Workaround for https://github.com/golang/go/issues/60506.

View File

@@ -44,7 +44,7 @@ var _ = Describe("interface go crypto/tls", func() {
It("sets the minimum TLS version to TLS 1.3", func() { It("sets the minimum TLS version to TLS 1.3", func() {
orig := &tls.Config{MinVersion: tls.VersionTLS12} orig := &tls.Config{MinVersion: tls.VersionTLS12}
conf := &tls.QUICConfig{TLSConfig: orig} conf := &tls.QUICConfig{TLSConfig: orig}
SetupConfigForServer(conf, false, nil, nil) SetupConfigForServer(conf, nil, nil)
Expect(conf.TLSConfig.MinVersion).To(BeEquivalentTo(tls.VersionTLS13)) Expect(conf.TLSConfig.MinVersion).To(BeEquivalentTo(tls.VersionTLS13))
// check that the original config wasn't modified // check that the original config wasn't modified
Expect(orig.MinVersion).To(BeEquivalentTo(tls.VersionTLS12)) Expect(orig.MinVersion).To(BeEquivalentTo(tls.VersionTLS12))