diff --git a/serverutil/tls.go b/serverutil/tls.go index 926488f4c6e566a828021c775faff3529c8bc168..7e5adff9134af3efd35e26a08b36f26704064bc5 100644 --- a/serverutil/tls.go +++ b/serverutil/tls.go @@ -60,6 +60,11 @@ func (c *TLSAuthConfig) match(req *http.Request) bool { return false } +var serverCiphers = []uint16{ + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, +} + // TLSServerConfig configures a TLS server with client authentication // and authorization based on the client X509 certificate. type TLSServerConfig struct { @@ -87,7 +92,7 @@ func (c *TLSServerConfig) TLSConfig() (*tls.Config, error) { Certificates: []tls.Certificate{cert}, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: cas, - CipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384}, + CipherSuites: serverCiphers, MinVersion: tls.VersionTLS12, PreferServerCipherSuites: true, }