remove the legacy PreferServerCipherSuites configuration

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-08-07 19:11:48 +02:00
parent 830116bcf2
commit 63212bb033
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
4 changed files with 15 additions and 19 deletions

View file

@ -302,10 +302,9 @@ func (s *Server) buildTLSConfig() {
certID = s.binding.GetAddress() certID = s.binding.GetAddress()
} }
s.tlsConfig = &tls.Config{ s.tlsConfig = &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(certID), GetCertificate: certMgr.GetCertificateFunc(certID),
MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion), MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion),
CipherSuites: s.binding.ciphers, CipherSuites: s.binding.ciphers,
PreferServerCipherSuites: true,
} }
logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v", logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v",
s.binding.GetAddress(), s.binding.ciphers, certID) s.binding.GetAddress(), s.binding.ciphers, certID)

View file

@ -108,11 +108,10 @@ func (s *httpdServer) listenAndServe() error {
certID = s.binding.GetAddress() certID = s.binding.GetAddress()
} }
config := &tls.Config{ config := &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(certID), GetCertificate: certMgr.GetCertificateFunc(certID),
MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion), MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion),
NextProtos: []string{"http/1.1", "h2"}, NextProtos: []string{"http/1.1", "h2"},
CipherSuites: util.GetTLSCiphersFromNames(s.binding.TLSCipherSuites), CipherSuites: util.GetTLSCiphersFromNames(s.binding.TLSCipherSuites),
PreferServerCipherSuites: true,
} }
httpServer.TLSConfig = config httpServer.TLSConfig = config
logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v", logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v",

View file

@ -126,11 +126,10 @@ func (c Conf) Initialize(configDir string) error {
return err return err
} }
config := &tls.Config{ config := &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(common.DefaultTLSKeyPaidID), GetCertificate: certMgr.GetCertificateFunc(common.DefaultTLSKeyPaidID),
MinVersion: util.GetTLSVersion(c.MinTLSVersion), MinVersion: util.GetTLSVersion(c.MinTLSVersion),
NextProtos: []string{"http/1.1", "h2"}, NextProtos: []string{"http/1.1", "h2"},
CipherSuites: util.GetTLSCiphersFromNames(c.TLSCipherSuites), CipherSuites: util.GetTLSCiphersFromNames(c.TLSCipherSuites),
PreferServerCipherSuites: true,
} }
logger.Debug(logSender, "", "configured TLS cipher suites: %v", config.CipherSuites) logger.Debug(logSender, "", "configured TLS cipher suites: %v", config.CipherSuites)
httpServer.TLSConfig = config httpServer.TLSConfig = config

View file

@ -80,11 +80,10 @@ func (s *webDavServer) listenAndServe(compressor *middleware.Compressor) error {
certID = s.binding.GetAddress() certID = s.binding.GetAddress()
} }
httpServer.TLSConfig = &tls.Config{ httpServer.TLSConfig = &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(certID), GetCertificate: certMgr.GetCertificateFunc(certID),
MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion), MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion),
NextProtos: []string{"http/1.1", "h2"}, NextProtos: []string{"http/1.1", "h2"},
CipherSuites: util.GetTLSCiphersFromNames(s.binding.TLSCipherSuites), CipherSuites: util.GetTLSCiphersFromNames(s.binding.TLSCipherSuites),
PreferServerCipherSuites: true,
} }
logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v", logger.Debug(logSender, "", "configured TLS cipher suites for binding %q: %v, certID: %v",
s.binding.GetAddress(), httpServer.TLSConfig.CipherSuites, certID) s.binding.GetAddress(), httpServer.TLSConfig.CipherSuites, certID)