Skip to content

Commit 17d6f41

Browse files
authored
Use secure cipher suites for tls by default (#380)
1 parent 5313cad commit 17d6f41

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

auth_server/main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ func ServeOnce(c *server.Config, cf string) (*server.AuthServer, *http.Server) {
6464
glog.Exitf("Failed to create auth server: %s", err)
6565
}
6666

67-
tlsConfig := &tls.Config{
68-
PreferServerCipherSuites: true,
69-
}
67+
tlsConfig := &tls.Config{}
7068
if c.Server.HSTS {
7169
glog.Info("HTTP Strict Transport Security enabled")
7270
}
@@ -101,6 +99,10 @@ func ServeOnce(c *server.Config, cf string) (*server.AuthServer, *http.Server) {
10199
}
102100
tlsConfig.CipherSuites = values
103101
glog.Infof("TLS CipherSuites: %s", c.Server.TLSCipherSuites)
102+
} else {
103+
for _, s := range tls.CipherSuites() {
104+
tlsConfig.CipherSuites = append(tlsConfig.CipherSuites, s.ID)
105+
}
104106
}
105107
if c.Server.CertFile != "" || c.Server.KeyFile != "" {
106108
// Check for partial configuration.

0 commit comments

Comments
 (0)