Add support for MaxVersion in tls.Options

This commit is contained in:
kmeekva 2019-10-29 07:58:05 -04:00 committed by Traefiker Bot
parent 5f8fb6c226
commit 1f39083555
8 changed files with 72 additions and 0 deletions

View file

@ -217,6 +217,12 @@ func buildTLSConfig(tlsOption Options) (*tls.Config, error) {
conf.MinVersion = minConst
}
// Set the maximum TLS version if set in the config TOML
if maxConst, exists := MaxVersion[tlsOption.MaxVersion]; exists {
conf.PreferServerCipherSuites = true
conf.MaxVersion = maxConst
}
// Set the list of CipherSuites if set in the config TOML
if tlsOption.CipherSuites != nil {
// if our list of CipherSuites is defined in the entryPoint config, we can re-initialize the suites list as empty