summaryrefslogtreecommitdiff
path: root/internal/configfile/config_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-03-06 22:20:28 +0100
committerJakob Unterwurzacher2017-03-07 20:56:50 +0100
commit9f17a78b4a63d7ab5b7e09c294a483c8b806aa49 (patch)
treeda9fc15d09fa4ce3edee8a9063da630d8b4560c4 /internal/configfile/config_test.go
parenta80d798c2deab44e2abc37eeae59546f0d7eec40 (diff)
configfile: enable HKDF and Raw64 feature flags by default
Also adds a test to verify that they are set in new config files.
Diffstat (limited to 'internal/configfile/config_test.go')
-rw-r--r--internal/configfile/config_test.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/internal/configfile/config_test.go b/internal/configfile/config_test.go
index 3b72536..42a0f2f 100644
--- a/internal/configfile/config_test.go
+++ b/internal/configfile/config_test.go
@@ -64,16 +64,20 @@ func TestCreateConfFile(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- _, _, err = LoadConfFile("config_test/tmp.conf", "test")
+ _, c, err := LoadConfFile("config_test/tmp.conf", "test")
if err != nil {
t.Fatal(err)
}
- // Raw64 is set by default since gocryptfs v1.3
- /*
- if !c.IsFeatureFlagSet(FlagRaw64) {
- t.Error("FlagRaw64 flag should be set but is not")
+ // Check that all expected feature flags are set
+ want := []flagIota{
+ FlagGCMIV128, FlagDirIV, FlagEMENames, FlagLongNames,
+ FlagRaw64, FlagHKDF,
+ }
+ for _, f := range want {
+ if !c.IsFeatureFlagSet(f) {
+ t.Errorf("Feature flag %q should be set but is not", knownFlags[f])
}
- */
+ }
}
func TestCreateConfFileAESSIV(t *testing.T) {