设置 TLS MinVersion
This commit is contained in:
		
							parent
							
								
									e28e7f4375
								
							
						
					
					
						commit
						08f65288d6
					
				@ -144,7 +144,7 @@ func run() {
 | 
				
			|||||||
		timeOutCtx, cancel := context.WithTimeout(context.Background(), networkTimeOut)
 | 
							timeOutCtx, cancel := context.WithTimeout(context.Background(), networkTimeOut)
 | 
				
			||||||
		var securityOption grpc.DialOption
 | 
							var securityOption grpc.DialOption
 | 
				
			||||||
		if agentConf.TLS {
 | 
							if agentConf.TLS {
 | 
				
			||||||
			securityOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
 | 
								securityOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12}))
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			securityOption = grpc.WithInsecure()
 | 
								securityOption = grpc.WithInsecure()
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user