config.go (etcd-3.5.5) | : | config.go (etcd-3.5.6) | ||
---|---|---|---|---|
skipping to change at line 622 | skipping to change at line 622 | |||
cfg.SelfSignedCertValidity = 1 | cfg.SelfSignedCertValidity = 1 | |||
} | } | |||
return cfg.Validate() | return cfg.Validate() | |||
} | } | |||
func updateCipherSuites(tls *transport.TLSInfo, ss []string) error { | func updateCipherSuites(tls *transport.TLSInfo, ss []string) error { | |||
if len(tls.CipherSuites) > 0 && len(ss) > 0 { | if len(tls.CipherSuites) > 0 && len(ss) > 0 { | |||
return fmt.Errorf("TLSInfo.CipherSuites is already specified (giv en %v)", ss) | return fmt.Errorf("TLSInfo.CipherSuites is already specified (giv en %v)", ss) | |||
} | } | |||
if len(ss) > 0 { | if len(ss) > 0 { | |||
cs := make([]uint16, len(ss)) | cs, err := tlsutil.GetCipherSuites(ss) | |||
for i, s := range ss { | if err != nil { | |||
var ok bool | return err | |||
cs[i], ok = tlsutil.GetCipherSuite(s) | ||||
if !ok { | ||||
return fmt.Errorf("unexpected TLS cipher suite %q | ||||
", s) | ||||
} | ||||
} | } | |||
tls.CipherSuites = cs | tls.CipherSuites = cs | |||
} | } | |||
return nil | return nil | |||
} | } | |||
// Validate ensures that '*embed.Config' fields are properly configured. | // Validate ensures that '*embed.Config' fields are properly configured. | |||
func (cfg *Config) Validate() error { | func (cfg *Config) Validate() error { | |||
if err := cfg.setupLogging(); err != nil { | if err := cfg.setupLogging(); err != nil { | |||
return err | return err | |||
End of changes. 1 change blocks. | ||||
8 lines changed or deleted | 3 lines changed or added |