mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
remove the legacy PreferServerCipherSuites configuration
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
830116bcf2
commit
63212bb033
4 changed files with 15 additions and 19 deletions
|
@ -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)
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue