aboutsummaryrefslogtreecommitdiff
path: root/masterkey.go
diff options
context:
space:
mode:
Diffstat (limited to 'masterkey.go')
-rw-r--r--masterkey.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/masterkey.go b/masterkey.go
index d943745..3d7afd1 100644
--- a/masterkey.go
+++ b/masterkey.go
@@ -8,6 +8,7 @@ import (
"golang.org/x/crypto/ssh/terminal"
"github.com/rfjakob/gocryptfs/internal/cryptocore"
+ "github.com/rfjakob/gocryptfs/internal/exitcodes"
"github.com/rfjakob/gocryptfs/internal/tlog"
)
@@ -50,11 +51,11 @@ func parseMasterKey(masterkey string) []byte {
key, err := hex.DecodeString(masterkey)
if err != nil {
tlog.Fatal.Printf("Could not parse master key: %v", err)
- os.Exit(1)
+ os.Exit(exitcodes.MasterKey)
}
if len(key) != cryptocore.KeyLen {
tlog.Fatal.Printf("Master key has length %d but we require length %d", len(key), cryptocore.KeyLen)
- os.Exit(1)
+ os.Exit(exitcodes.MasterKey)
}
tlog.Info.Printf("Using explicit master key.")
tlog.Info.Printf(tlog.ColorYellow +