Skip to content

Commit

Permalink
TLS: only support TLS 1.2
Browse files Browse the repository at this point in the history
TLS 1.0 and 1.1 are deprecated by major vendors (e.g. browsers).

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
  • Loading branch information
roidelapluie committed Apr 27, 2020
1 parent 091bed0 commit fcd842f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion https/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit fcd842f

Please sign in to comment.