set minTLS version (#473)

Signed-off-by: yaron2 <schneider.yaron@live.com>
This commit is contained in:
Yaron Schneider 2023-11-02 09:30:34 -07:00 committed by GitHub
parent 29bf88b1b0
commit 2a85a7bb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ func NewClientWithAddressContext(ctx context.Context, address string, opts ...Cl
}
if cOpts.useTLS || strings.Contains(address, "https://") {
option = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
option = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}))
} else {
option = grpc.WithTransportCredentials(insecure.NewCredentials())
}