Remove TLS prefer server cipher suites configuration option due to deprecation in go 1.17. (#13084)
This commit is contained in:
parent
d89c7b3d7e
commit
6fadf30a79
|
@ -55,8 +55,6 @@ type Listener struct {
|
|||
TLSMaxVersion string `hcl:"tls_max_version"`
|
||||
TLSCipherSuites []uint16 `hcl:"-"`
|
||||
TLSCipherSuitesRaw string `hcl:"tls_cipher_suites"`
|
||||
TLSPreferServerCipherSuites bool `hcl:"-"`
|
||||
TLSPreferServerCipherSuitesRaw interface{} `hcl:"tls_prefer_server_cipher_suites"`
|
||||
TLSRequireAndVerifyClientCert bool `hcl:"-"`
|
||||
TLSRequireAndVerifyClientCertRaw interface{} `hcl:"tls_require_and_verify_client_cert"`
|
||||
TLSClientCAFile string `hcl:"tls_client_ca_file"`
|
||||
|
@ -216,14 +214,6 @@ func ParseListeners(result *SharedConfig, list *ast.ObjectList) error {
|
|||
}
|
||||
}
|
||||
|
||||
if l.TLSPreferServerCipherSuitesRaw != nil {
|
||||
if l.TLSPreferServerCipherSuites, err = parseutil.ParseBool(l.TLSPreferServerCipherSuitesRaw); err != nil {
|
||||
return multierror.Prefix(fmt.Errorf("invalid value for tls_prefer_server_cipher_suites: %w", err), fmt.Sprintf("listeners.%d", i))
|
||||
}
|
||||
|
||||
l.TLSPreferServerCipherSuitesRaw = nil
|
||||
}
|
||||
|
||||
if l.TLSRequireAndVerifyClientCertRaw != nil {
|
||||
if l.TLSRequireAndVerifyClientCert, err = parseutil.ParseBool(l.TLSRequireAndVerifyClientCertRaw); err != nil {
|
||||
return multierror.Prefix(fmt.Errorf("invalid value for tls_require_and_verify_client_cert: %w", err), fmt.Sprintf("listeners.%d", i))
|
||||
|
|
|
@ -101,10 +101,9 @@ func TLSConfig(
|
|||
|
||||
PASSPHRASECORRECT:
|
||||
tlsConf := &tls.Config{
|
||||
GetCertificate: cg.GetCertificate,
|
||||
NextProtos: []string{"h2", "http/1.1"},
|
||||
ClientAuth: tls.RequestClientCert,
|
||||
PreferServerCipherSuites: l.TLSPreferServerCipherSuites,
|
||||
GetCertificate: cg.GetCertificate,
|
||||
NextProtos: []string{"h2", "http/1.1"},
|
||||
ClientAuth: tls.RequestClientCert,
|
||||
}
|
||||
|
||||
if l.TLSMinVersion == "" {
|
||||
|
|
Loading…
Reference in New Issue