TLS: only support TLS 1.2

TLS 1.0 and 1.1 are deprecated by major vendors (e.g. browsers).

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2020-04-25 15:51:32 +02:00 committed by Johannes 'fish' Ziemke
parent 091bed01b0
commit 0ef1d4dc15
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
cfg := &tls.Config{}
cfg := &tls.Config{
MinVersion: tls.VersionTLS12,
}
if len(c.TLSCertPath) == 0 {
return nil, errors.New("missing TLSCertPath")
}