设置 TLS MinVersion

This commit is contained in:
Lemoe 2021-11-06 11:42:23 +08:00
parent e28e7f4375
commit 08f65288d6
No known key found for this signature in database
GPG Key ID: 2570C7D85A4A74CA

View File

@ -144,7 +144,7 @@ func run() {
timeOutCtx, cancel := context.WithTimeout(context.Background(), networkTimeOut)
var securityOption grpc.DialOption
if agentConf.TLS {
securityOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
securityOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}))
} else {
securityOption = grpc.WithInsecure()
}