Skip to content

Commit

Permalink
Remove server support for TLS 1.0 and TLS 1.1
Browse files Browse the repository at this point in the history
This should not be needed any more and is not recommended.

Signed-off-by: Justin Cormack <[email protected]>
  • Loading branch information
justincormack committed Feb 27, 2018
1 parent b7274b1 commit eed1c49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tlsconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ var allTLSVersions = map[uint16]struct{}{
// ServerDefault returns a secure-enough TLS configuration for the server TLS configuration.
func ServerDefault(ops ...func(*tls.Config)) *tls.Config {
tlsconfig := &tls.Config{
// Avoid fallback by default to SSL protocols < TLS1.0
MinVersion: tls.VersionTLS10,
// Avoid fallback by default to SSL protocols < TLS1.2
MinVersion: tls.VersionTLS12,
PreferServerCipherSuites: true,
CipherSuites: DefaultServerAcceptedCiphers,
}
Expand Down
3 changes: 1 addition & 2 deletions tlsconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestConfigServerTLSServerCertsOnly(t *testing.T) {
if !tlsConfig.PreferServerCipherSuites {
t.Fatal("Expected server to prefer cipher suites")
}
if tlsConfig.MinVersion != tls.VersionTLS10 {
if tlsConfig.MinVersion != tls.VersionTLS12 {
t.Fatal("Unexpected server TLS version")
}
}
Expand Down Expand Up @@ -329,7 +329,6 @@ func TestConfigClientDefaultWithTLSMinimumModifier(t *testing.T) {
// minimum version should be set accordingly
func TestConfigServerTLSMinVersionIsSetBasedOnOptions(t *testing.T) {
versions := []uint16{
tls.VersionTLS11,
tls.VersionTLS12,
}
key, cert := getCertAndKey()
Expand Down

0 comments on commit eed1c49

Please sign in to comment.