aboutsummaryrefslogtreecommitdiff
path: root/cryptfs
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs')
-rw-r--r--cryptfs/config_file.go8
-rw-r--r--cryptfs/config_test.go2
2 files changed, 4 insertions, 6 deletions
diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go
index bf1f2a0..48e5474 100644
--- a/cryptfs/config_file.go
+++ b/cryptfs/config_file.go
@@ -33,9 +33,10 @@ type ConfFile struct {
// CreateConfFile - create a new config with a random key encrypted with
// "password" and write it to "filename".
// Uses scrypt with cost parameter logN.
-func CreateConfFile(filename string, password string, plaintextNames bool, logN int, EMENames bool) error {
+func CreateConfFile(filename string, password string, plaintextNames bool, logN int) error {
var cf ConfFile
cf.filename = filename
+ cf.Version = HEADER_CURRENT_VERSION
// Generate new random master key
key := RandBytes(KEY_LEN)
@@ -44,10 +45,7 @@ func CreateConfFile(filename string, password string, plaintextNames bool, logN
// This sets ScryptObject and EncryptedKey
cf.EncryptKey(key, password, logN)
- // Set defaults
- cf.Version = HEADER_CURRENT_VERSION
-
- // Set values chosen by the user
+ // Set feature flags
if plaintextNames {
cf.FeatureFlags = append(cf.FeatureFlags, FlagPlaintextNames)
} else {
diff --git a/cryptfs/config_test.go b/cryptfs/config_test.go
index 01c0d71..817e6ae 100644
--- a/cryptfs/config_test.go
+++ b/cryptfs/config_test.go
@@ -59,7 +59,7 @@ func TestLoadV2StrangeFeature(t *testing.T) {
}
func TestCreateConfFile(t *testing.T) {
- err := CreateConfFile("config_test/tmp.conf", "test", false, 10, true)
+ err := CreateConfFile("config_test/tmp.conf", "test", false, 10)
if err != nil {
t.Fatal(err)
}