Merge pull request #14500 from dusk125/release-3.5

Release-3.5: server/etcdmain: add configurable cipher list to gRPC proxy listener
This commit is contained in:
Benjamin Wang
2022-10-16 06:35:17 +08:00
committed by GitHub
4 changed files with 88 additions and 25 deletions

View File

@@ -619,13 +619,9 @@ func updateCipherSuites(tls *transport.TLSInfo, ss []string) error {
return fmt.Errorf("TLSInfo.CipherSuites is already specified (given %v)", ss)
}
if len(ss) > 0 {
cs := make([]uint16, len(ss))
for i, s := range ss {
var ok bool
cs[i], ok = tlsutil.GetCipherSuite(s)
if !ok {
return fmt.Errorf("unexpected TLS cipher suite %q", s)
}
cs, err := tlsutil.GetCipherSuites(ss)
if err != nil {
return err
}
tls.CipherSuites = cs
}