allow to configure the minimum version of TLS to be enabled

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-02-13 15:56:07 +01:00
parent 66945c0a02
commit 1fccd05e9e
13 changed files with 96 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ func (s *httpdServer) listenAndServe() error {
if certMgr != nil && s.binding.EnableHTTPS {
config := &tls.Config{
GetCertificate: certMgr.GetCertificateFunc(),
MinVersion: tls.VersionTLS12,
MinVersion: util.GetTLSVersion(s.binding.MinTLSVersion),
NextProtos: []string{"http/1.1", "h2"},
CipherSuites: util.GetTLSCiphersFromNames(s.binding.TLSCipherSuites),
PreferServerCipherSuites: true,