Skip to content

Commit 0ef1d4d

Browse files
Julien Pivottodiscordianfish
authored andcommitted
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>
1 parent 091bed0 commit 0ef1d4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

https/tls_config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
5050

5151
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
5252
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
53-
cfg := &tls.Config{}
53+
cfg := &tls.Config{
54+
MinVersion: tls.VersionTLS12,
55+
}
5456
if len(c.TLSCertPath) == 0 {
5557
return nil, errors.New("missing TLSCertPath")
5658
}

0 commit comments

Comments
 (0)