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

@@ -8,7 +8,7 @@ import (
"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
// 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() {
orig := &tls.Config{MinVersion: tls.VersionTLS12}
conf := &tls.QUICConfig{TLSConfig: orig}
SetupConfigForServer(conf, false, nil, nil)
SetupConfigForServer(conf, nil, nil)
Expect(conf.TLSConfig.MinVersion).To(BeEquivalentTo(tls.VersionTLS13))
// check that the original config wasn't modified
Expect(orig.MinVersion).To(BeEquivalentTo(tls.VersionTLS12))