diff options
author | Jakob Unterwurzacher | 2019-03-03 13:25:30 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-03-03 13:25:30 +0100 |
commit | cf27037f20723e934320edeff7f8aa356bdca467 (patch) | |
tree | b12428d172325fcfb517af26f7985651ef70e902 /main.go | |
parent | 61940a9c0666eba8be21de4f1cd182912f74f929 (diff) |
Allow multiple -extpass arguments
To support arguments containing spaces, -extpass can now
be passed multiple times.
https://github.com/rfjakob/gocryptfs/issues/289
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,7 +53,7 @@ func loadConfig(args *argContainer) (masterkey []byte, cf *configfile.ConfFile, pw = readpassword.Trezor(cf.TrezorPayload) } else { // Normal password entry - pw = readpassword.Once(args.extpass, args.passfile, "") + pw = readpassword.Once([]string(args.extpass), args.passfile, "") } tlog.Info.Println("Decrypting master key") masterkey, err = cf.DecryptMasterKey(pw) @@ -93,7 +93,7 @@ func changePassword(args *argContainer) { log.Panic("empty masterkey") } tlog.Info.Println("Please enter your new password.") - newPw := readpassword.Twice(args.extpass, args.passfile) + newPw := readpassword.Twice([]string(args.extpass), args.passfile) readpassword.CheckTrailingGarbage() confFile.EncryptKey(masterkey, newPw, confFile.ScryptObject.LogN()) for i := range newPw { |