server/etcdmain: eliminate deprecated tlsConfig.BuildNameToCertificate()

As the doc is saying:

Deprecated: NameToCertificate only allows associating a single certificate
with a given name. Leave that field nil to let the library select the first
compatible chain from Certificates.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
This commit is contained in:
Jes Cok 2024-04-13 11:41:18 +08:00
parent 2e6eebef85
commit ecb52d7d48

View File

@ -576,7 +576,6 @@ func newHTTPTransport(ca, cert, key string) (*http.Transport, error) {
Certificates: []tls.Certificate{keyPair},
RootCAs: caPool,
}
tlsConfig.BuildNameToCertificate()
tr.TLSClientConfig = tlsConfig
} else if grpcProxyInsecureSkipTLSVerify {
tlsConfig := &tls.Config{InsecureSkipVerify: grpcProxyInsecureSkipTLSVerify}