diff options
author | Jakob Unterwurzacher | 2016-10-16 18:17:28 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-10-16 18:17:28 +0200 |
commit | c487e176bd517d815315583dfc795dc629ffb20a (patch) | |
tree | 133948cbad8e84063dd034bf0295934a60424bab /internal | |
parent | ca3cc5eca37617d617c3e0250e3e3aa683fc2b1e (diff) |
main: allow password change with -masterkey
Requested at https://github.com/rfjakob/gocryptfs/issues/28
Diffstat (limited to 'internal')
-rw-r--r-- | internal/configfile/config_file.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/configfile/config_file.go b/internal/configfile/config_file.go index 79960e4..97a1f3a 100644 --- a/internal/configfile/config_file.go +++ b/internal/configfile/config_file.go @@ -139,7 +139,11 @@ func LoadConfFile(filename string, password string) ([]byte, *ConfFile, error) { return nil, nil, fmt.Errorf("Deprecated filesystem") } - + if password == "" { + // We have validated the config file, but without a password we cannot + // decrypt the master key. Return only the parsed config. + return nil, &cf, nil + } // Generate derived key from password scryptHash := cf.ScryptObject.DeriveKey(password) |