mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-21 18:26:32 +08:00
tls: Change default tls minimum version to 1.2 (#2053)
This commit is contained in:
parent
5552dcbbc7
commit
13dfffd203
|
@ -511,7 +511,7 @@ func SetDefaultTLSParams(config *Config) {
|
|||
|
||||
// Set default protocol min and max versions - must balance compatibility and security
|
||||
if config.ProtocolMinVersion == 0 {
|
||||
config.ProtocolMinVersion = tls.VersionTLS11
|
||||
config.ProtocolMinVersion = tls.VersionTLS12
|
||||
}
|
||||
if config.ProtocolMaxVersion == 0 {
|
||||
config.ProtocolMaxVersion = tls.VersionTLS12
|
||||
|
|
|
@ -67,8 +67,8 @@ func TestSetupParseBasic(t *testing.T) {
|
|||
}
|
||||
|
||||
// Security defaults
|
||||
if cfg.ProtocolMinVersion != tls.VersionTLS11 {
|
||||
t.Errorf("Expected 'tls1.1 (0x0302)' as ProtocolMinVersion, got %#v", cfg.ProtocolMinVersion)
|
||||
if cfg.ProtocolMinVersion != tls.VersionTLS12 {
|
||||
t.Errorf("Expected 'tls1.2 (0x0303)' as ProtocolMinVersion, got %#v", cfg.ProtocolMinVersion)
|
||||
}
|
||||
if cfg.ProtocolMaxVersion != tls.VersionTLS12 {
|
||||
t.Errorf("Expected 'tls1.2 (0x0303)' as ProtocolMaxVersion, got %v", cfg.ProtocolMaxVersion)
|
||||
|
|
Loading…
Reference in New Issue
Block a user