diff options
author | Jakob Unterwurzacher | 2015-11-03 00:00:13 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-03 00:00:13 +0100 |
commit | de56fe9e3503d98e359551072633c804794b94e1 (patch) | |
tree | c9748200eb69eabd2fbfe1b019380a403f20ccb7 /cryptfs/config_file.go | |
parent | 66db3ad086692d249bdf8e14921760f7a460bb99 (diff) |
Implement PlainTextNames mode
Also, forbid access to "gocryptfs.conf" in the root dir.
Diffstat (limited to 'cryptfs/config_file.go')
-rw-r--r-- | cryptfs/config_file.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go index de3054a..a790c51 100644 --- a/cryptfs/config_file.go +++ b/cryptfs/config_file.go @@ -76,7 +76,7 @@ func LoadConfFile(filename string, password string) ([]byte, *ConfFile, error) { // Unlock master key using password-based key // We use stock go GCM instead of OpenSSL here as speed is not important // and we get better error messages - cfs := NewCryptFS(scryptHash, false) + cfs := NewCryptFS(scryptHash, false, false) key, err := cfs.DecryptBlock(cf.EncryptedKey, 0, nil) if err != nil { Warn.Printf("failed to unlock master key: %s\n", err.Error()) @@ -95,7 +95,7 @@ func (cf *ConfFile) EncryptKey(key []byte, password string) { scryptHash := cf.ScryptObject.DeriveKey(password) // Lock master key using password-based key - cfs := NewCryptFS(scryptHash, false) + cfs := NewCryptFS(scryptHash, false, false) cf.EncryptedKey = cfs.EncryptBlock(key, 0, nil) } |