diff options
author | Jakob Unterwurzacher | 2020-05-17 19:31:04 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-05-17 19:31:04 +0200 |
commit | 416080203b4dd79de857eaf7c7cc97d050e00a9f (patch) | |
tree | ed729c4cd365acc803a3d1e339eae8f1e8112f4c /main.go | |
parent | ded4bbe6456dcfaa770f2c06df46d578fcbaa97e (diff) |
main: accept multiple -passfile options
Each file will be read and then concatenated
for the effictive password. This can be used as a
kind of multi-factor authenticiton.
Fixes https://github.com/rfjakob/gocryptfs/issues/288
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,7 +50,7 @@ func loadConfig(args *argContainer) (masterkey []byte, cf *configfile.ConfFile, if masterkey != nil { return masterkey, cf, nil } - pw := readpassword.Once([]string(args.extpass), args.passfile, "") + pw := readpassword.Once([]string(args.extpass), []string(args.passfile), "") tlog.Info.Println("Decrypting master key") masterkey, err = cf.DecryptMasterKey(pw) for i := range pw { @@ -79,7 +79,7 @@ func changePassword(args *argContainer) { log.Panic("empty masterkey") } tlog.Info.Println("Please enter your new password.") - newPw := readpassword.Twice([]string(args.extpass), args.passfile) + newPw := readpassword.Twice([]string(args.extpass), []string(args.passfile)) logN := confFile.ScryptObject.LogN() if args._explicitScryptn { logN = args.scryptn |