TLS: allow to configure cipher suites

Fixes #316
This commit is contained in:
Nicola Murino
2021-02-18 20:17:16 +01:00
parent 552a96533e
commit 5da4f931c5
12 changed files with 162 additions and 19 deletions

View File

@@ -162,6 +162,7 @@ func (s *Server) GetTLSConfig() (*tls.Config, error) {
tlsConfig := &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(),
MinVersion: tls.VersionTLS12,
CipherSuites: utils.GetTLSCiphersFromNames(s.binding.TLSCipherSuites),
}
if s.binding.ClientAuthType == 1 {
tlsConfig.ClientCAs = certMgr.GetRootCAs()