From ff69868922c2694406cc368a06d59e0a4c86c81e Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 19 Dec 2014 23:19:28 +0000 Subject: [PATCH] allow password to be set through WEAVE_PASSWORD env var so that passwords can be supplied w/o them showing up in 'ps' --- weaver/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/weaver/main.go b/weaver/main.go index 48ab2626..674875b4 100644 --- a/weaver/main.go +++ b/weaver/main.go @@ -73,6 +73,15 @@ func main() { log.Fatal(err) } + if password == "" { + password = os.Getenv("WEAVE_PASSWORD") + } + if password == "" { + log.Println("Communication between peers is unencrypted.") + } else { + log.Println("Communication between peers is encrypted.") + } + var logFrame func(string, []byte, *layers.Ethernet) if debug { logFrame = func(prefix string, frame []byte, eth *layers.Ethernet) {