You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/server/app/options/options.go
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ type ProxyRunOptions struct {
101
101
// also checks if given comma separated list contains cipher from tls.InsecureCipherSuites().
102
102
// NOTE that cipher suites are not configurable for TLS1.3,
103
103
// see: https://pkg.go.dev/crypto/tls#Config, so in that case, this option won't have any effect.
104
-
CipherSuitesstring
104
+
CipherSuites[]string
105
105
}
106
106
107
107
func (o*ProxyRunOptions) Flags() *pflag.FlagSet {
@@ -136,7 +136,7 @@ func (o *ProxyRunOptions) Flags() *pflag.FlagSet {
136
136
flags.IntVar(&o.KubeconfigBurst, "kubeconfig-burst", o.KubeconfigBurst, "Maximum client burst (proxy server uses this client to authenticate agent tokens).")
flags.StringVar(&o.ProxyStrategies, "proxy-strategies", o.ProxyStrategies, "The list of proxy strategies used by the server to pick a backend/tunnel, available strategies are: default, destHost.")
139
-
flags.StringVar(&o.CipherSuites, "cipher-suites", o.CipherSuites, "The comma separated list of allowed cipher suites. Has no effect on TLS1.3. Empty means allow default list.")
139
+
flags.StringSliceVar(&o.CipherSuites, "cipher-suites", o.CipherSuites, "The comma separated list of allowed cipher suites. Has no effect on TLS1.3. Empty means allow default list.")
140
140
141
141
flags.Bool("warn-on-channel-limit", true, "This behavior is now thread safe and always on. This flag will be removed in a future release.")
142
142
flags.MarkDeprecated("warn-on-channel-limit", "This behavior is now thread safe and always on. This flag will be removed in a future release.")
@@ -306,10 +306,9 @@ func (o *ProxyRunOptions) Validate() error {
306
306
}
307
307
308
308
// validate the cipher suites
309
-
ifo.CipherSuites!="" {
309
+
iflen(o.CipherSuites)!=0 {
310
310
acceptedCiphers:=util.GetAcceptedCiphers()
311
-
css:=strings.Split(o.CipherSuites, ",")
312
-
for_, cipher:=rangecss {
311
+
for_, cipher:=rangeo.CipherSuites {
313
312
_, ok:=acceptedCiphers[cipher]
314
313
if!ok {
315
314
returnfmt.Errorf("cipher suite %s not supported, doesn't exist or considered as insecure", cipher)
0 commit comments