RPC: Add --notls to disable TLS for RPC endpoints

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
Johan T. Halsethandnicolas.dorier committed 2020-11-11 09:37:52 +01:00
1 parent a2a924e1e5
commit 5be7e710c7
2 files changed
+7

No files matched your search

+6
View File
@@ -990,6 +990,12 @@ func getTLSConfig(cfg *Config) ([]grpc.ServerOption, []grpc.DialOption,
// Return a function closure that can be used to listen on a given
// address with the current TLS config.
restListen := func(addr net.Addr) (net.Listener, error) {
// For restListen we will call ListenOnAddress if TLS is
// disabled.
if cfg.DisableRestTLS {
return lncfg.ListenOnAddress(addr)
}
return lncfg.TLSListenOnAddress(addr, tlsCfg)
}