@@ -12,15 +12,16 @@ import (
1212
1313// ClientConfig represents the standard client TLS config.
1414type ClientConfig struct {
15- UseTLS bool `toml:"use_tls"`
16- TLSCA string `toml:"tls_ca"`
17- TLSCert string `toml:"tls_cert"`
18- TLSKey string `toml:"tls_key"`
19- TLSKeyPwd string `toml:"tls_key_pwd"`
20- InsecureSkipVerify bool `toml:"insecure_skip_verify"`
21- ServerName string `toml:"tls_server_name"`
22- TLSMinVersion string `toml:"tls_min_version"`
23- TLSMaxVersion string `toml:"tls_max_version"`
15+ UseTLS bool `toml:"use_tls"`
16+ TLSCA string `toml:"tls_ca"`
17+ TLSCert string `toml:"tls_cert"`
18+ TLSKey string `toml:"tls_key"`
19+ TLSKeyPwd string `toml:"tls_key_pwd"`
20+ InsecureSkipVerify bool `toml:"insecure_skip_verify" json:"insecure_skip_verify"`
21+ ServerName string `toml:"tls_server_name" json:"tls_server_name"`
22+ TLSMinVersion string `toml:"tls_min_version"`
23+ TLSMaxVersion string `toml:"tls_max_version"`
24+ TLSCipherSuites []string `toml:"tls_cipher_suites"`
2425}
2526
2627// ServerConfig represents the standard server TLS config.
@@ -62,6 +63,15 @@ func (c *ClientConfig) TLSConfig() (*tls.Config, error) {
6263 }
6364 }
6465
66+ if len (c .TLSCipherSuites ) != 0 {
67+ cipherSuites , err := ParseCiphers (c .TLSCipherSuites )
68+ if err != nil {
69+ return nil , fmt .Errorf (
70+ "could not parse client cipher suites %s: %v" , strings .Join (c .TLSCipherSuites , "," ), err )
71+ }
72+ tlsConfig .CipherSuites = cipherSuites
73+ }
74+
6575 if c .ServerName != "" {
6676 tlsConfig .ServerName = c .ServerName
6777 }
0 commit comments