aboutsummaryrefslogtreecommitdiff
path: root/masterkey.go
diff options
context:
space:
mode:
Diffstat (limited to 'masterkey.go')
-rw-r--r--masterkey.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/masterkey.go b/masterkey.go
index 2e8ca4c..c933669 100644
--- a/masterkey.go
+++ b/masterkey.go
@@ -49,12 +49,16 @@ func parseMasterKey(masterkey string) []byte {
masterkey = strings.Replace(masterkey, "-", "", -1)
key, err := hex.DecodeString(masterkey)
if err != nil {
- tlog.Fatal.Printf("Could not parse master key: %v\n", err)
+ tlog.Fatal.Printf("Could not parse master key: %v", err)
os.Exit(1)
}
if len(key) != cryptocore.KeyLen {
- tlog.Fatal.Printf("Master key has length %d but we require length %d\n", len(key), cryptocore.KeyLen)
+ tlog.Fatal.Printf("Master key has length %d but we require length %d", len(key), cryptocore.KeyLen)
os.Exit(1)
}
+ tlog.Info.Printf("Using explicit master key.")
+ tlog.Info.Printf(tlog.ColorYellow +
+ "THE MASTER KEY IS VISIBLE VIA \"ps ax\" AND MAY BE STORED IN YOUR SHELL HISTORY!\n" +
+ "ONLY USE THIS MODE FOR EMERGENCIES." + tlog.ColorReset)
return key
}