diff options
author | Jakob Unterwurzacher | 2016-09-20 22:59:10 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-09-25 16:43:17 +0200 |
commit | 5f726aaa9d95be30ecfcb61637df3ccc133bf2ea (patch) | |
tree | 37086b2f3c0589a977dce72eb245e9e50da8430b /internal/configfile/config_test.go | |
parent | 90f0bdc2241290d9d495b606abaec2e973383b80 (diff) |
contentenc: add GCM-SIV support
Also add ReverseDummyNonce nonce generation.
Diffstat (limited to 'internal/configfile/config_test.go')
-rw-r--r-- | internal/configfile/config_test.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/internal/configfile/config_test.go b/internal/configfile/config_test.go index e34a3cd..72c25f6 100644 --- a/internal/configfile/config_test.go +++ b/internal/configfile/config_test.go @@ -60,7 +60,7 @@ func TestLoadV2StrangeFeature(t *testing.T) { } func TestCreateConfFile(t *testing.T) { - err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test") + err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", false) if err != nil { t.Fatal(err) } @@ -71,6 +71,20 @@ func TestCreateConfFile(t *testing.T) { } +func TestCreateConfFileReverse(t *testing.T) { + err := CreateConfFile("config_test/tmp.conf", "test", false, 10, "test", true) + if err != nil { + t.Fatal(err) + } + _, c, err := LoadConfFile("config_test/tmp.conf", "test") + if err != nil { + t.Fatal(err) + } + if !c.IsFeatureFlagSet(FlagGCMSIV) { + t.Error("GCMSIV flag should be set but is not") + } +} + func TestIsFeatureFlagKnown(t *testing.T) { // Test a few hardcoded values testKnownFlags := []string{"DirIV", "PlaintextNames", "EMENames", "GCMIV128", "LongNames"} |