From f09af97d7312081b4cba08aa42695aafd1f2110d Mon Sep 17 00:00:00 2001 From: Cabinfever_B Date: Thu, 4 Jan 2024 15:48:38 +0800 Subject: [PATCH] directly save tls config Signed-off-by: Cabinfever_B --- client/client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/client.go b/client/client.go index c4b1fb4b6d7..26496544415 100644 --- a/client/client.go +++ b/client/client.go @@ -359,7 +359,7 @@ func createClientWithKeyspace( ctx context.Context, keyspaceID uint32, svrAddrs []string, security SecurityOption, opts ...ClientOption, ) (Client, error) { - pdTlsCfg := &tlsutil.TLSConfig{ + pdTLSCfg := &tlsutil.TLSConfig{ CAPath: security.CAPath, CertPath: security.CertPath, KeyPath: security.KeyPath, @@ -368,7 +368,7 @@ func createClientWithKeyspace( SSLCertBytes: security.SSLCertBytes, SSLKEYBytes: security.SSLKEYBytes, } - tlsCfg, err := pdTlsCfg.ToTLSConfig() + tlsCfg, err := pdTLSCfg.ToTLSConfig() if err != nil { return nil, err } @@ -477,7 +477,7 @@ func newClientWithKeyspaceName( ctx context.Context, keyspaceName string, svrAddrs []string, security SecurityOption, opts ...ClientOption, ) (Client, error) { - pdTlsCfg := &tlsutil.TLSConfig{ + pdTLSCfg := &tlsutil.TLSConfig{ CAPath: security.CAPath, CertPath: security.CertPath, KeyPath: security.KeyPath, @@ -486,7 +486,7 @@ func newClientWithKeyspaceName( SSLCertBytes: security.SSLCertBytes, SSLKEYBytes: security.SSLKEYBytes, } - tlsCfg, err := pdTlsCfg.ToTLSConfig() + tlsCfg, err := pdTLSCfg.ToTLSConfig() if err != nil { return nil, err }