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

This commit is contained in:
Chris Werner Rau 2018-03-10 16:39:07 +01:00 committed by Matt Holt
parent 5552dcbbc7
commit 13dfffd203
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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)