Commit 13dfffd2 authored by Chris Werner Rau's avatar Chris Werner Rau Committed by Matt Holt

tls: Change default tls minimum version to 1.2 (#2053)

parent 5552dcbb
...@@ -511,7 +511,7 @@ func SetDefaultTLSParams(config *Config) { ...@@ -511,7 +511,7 @@ func SetDefaultTLSParams(config *Config) {
// Set default protocol min and max versions - must balance compatibility and security // Set default protocol min and max versions - must balance compatibility and security
if config.ProtocolMinVersion == 0 { if config.ProtocolMinVersion == 0 {
config.ProtocolMinVersion = tls.VersionTLS11 config.ProtocolMinVersion = tls.VersionTLS12
} }
if config.ProtocolMaxVersion == 0 { if config.ProtocolMaxVersion == 0 {
config.ProtocolMaxVersion = tls.VersionTLS12 config.ProtocolMaxVersion = tls.VersionTLS12
......
...@@ -67,8 +67,8 @@ func TestSetupParseBasic(t *testing.T) { ...@@ -67,8 +67,8 @@ func TestSetupParseBasic(t *testing.T) {
} }
// Security defaults // Security defaults
if cfg.ProtocolMinVersion != tls.VersionTLS11 { if cfg.ProtocolMinVersion != tls.VersionTLS12 {
t.Errorf("Expected 'tls1.1 (0x0302)' as ProtocolMinVersion, got %#v", cfg.ProtocolMinVersion) t.Errorf("Expected 'tls1.2 (0x0303)' as ProtocolMinVersion, got %#v", cfg.ProtocolMinVersion)
} }
if cfg.ProtocolMaxVersion != tls.VersionTLS12 { if cfg.ProtocolMaxVersion != tls.VersionTLS12 {
t.Errorf("Expected 'tls1.2 (0x0303)' as ProtocolMaxVersion, got %v", cfg.ProtocolMaxVersion) t.Errorf("Expected 'tls1.2 (0x0303)' as ProtocolMaxVersion, got %v", cfg.ProtocolMaxVersion)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment