From 79e3e2867114a15cbde4e51990042d39e8ff081d Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 8 Oct 2016 21:49:21 +0200 Subject: tests: add v1.1-reverse-plaintextnames example filesystem --- .../example_filesystems_test.go | 27 ++++++++++++++++++++++ .../.gocryptfs.reverse.conf | 17 ++++++++++++++ .../v1.1-reverse-plaintextnames/abs | 1 + ...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 1 + .../v1.1-reverse-plaintextnames/rel | 1 + .../v1.1-reverse-plaintextnames/status.txt | 1 + 6 files changed, 48 insertions(+) create mode 100644 tests/example_filesystems/v1.1-reverse-plaintextnames/.gocryptfs.reverse.conf create mode 120000 tests/example_filesystems/v1.1-reverse-plaintextnames/abs create mode 100644 tests/example_filesystems/v1.1-reverse-plaintextnames/longname_255_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx create mode 120000 tests/example_filesystems/v1.1-reverse-plaintextnames/rel create mode 100644 tests/example_filesystems/v1.1-reverse-plaintextnames/status.txt (limited to 'tests') diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go index 71fe0a9..ffb2299 100644 --- a/tests/example_filesystems/example_filesystems_test.go +++ b/tests/example_filesystems/example_filesystems_test.go @@ -184,3 +184,30 @@ func TestExampleFSv11reverse(t *testing.T) { test_helpers.UnmountPanic(dirC) test_helpers.UnmountPanic(dirB) } + +// gocryptfs v1.1 introduced reverse mode +func TestExampleFSv11reversePlaintextnames(t *testing.T) { + dirA := "v1.1-reverse-plaintextnames" + dirB := test_helpers.TmpDir + "/" + dirA + ".B" + err := os.Mkdir(dirB, 0700) + if err != nil { + t.Fatal(err) + } + dirC := test_helpers.TmpDir + "/" + dirA + ".C" + err = os.Mkdir(dirC, 0700) + if err != nil { + t.Fatal(err) + } + test_helpers.MountOrFatal(t, dirA, dirB, "-reverse", "-extpass", "echo test", opensslOpt) + test_helpers.MountOrFatal(t, dirB, dirC, "-extpass", "echo test", opensslOpt) + checkExampleFSrw(t, dirC, false) + test_helpers.UnmountPanic(dirC) + test_helpers.UnmountPanic(dirB) + + m := "e7fb8f0d-2a81df9e-26611e4b-5540b218-e48aa458-c2a623af-d0c82637-1466b5f2" + test_helpers.MountOrFatal(t, dirA, dirB, "-reverse", "-masterkey", m, opensslOpt) + test_helpers.MountOrFatal(t, dirB, dirC, "-aessiv", "-masterkey", m, opensslOpt) + checkExampleFSrw(t, dirC, false) + test_helpers.UnmountPanic(dirC) + test_helpers.UnmountPanic(dirB) +} diff --git a/tests/example_filesystems/v1.1-reverse-plaintextnames/.gocryptfs.reverse.conf b/tests/example_filesystems/v1.1-reverse-plaintextnames/.gocryptfs.reverse.conf new file mode 100644 index 0000000..e7ea1a8 --- /dev/null +++ b/tests/example_filesystems/v1.1-reverse-plaintextnames/.gocryptfs.reverse.conf @@ -0,0 +1,17 @@ +{ + "Creator": "gocryptfs v1.1-beta1-33-gf054353-dirty", + "EncryptedKey": "bMqEbjtvZek9yAGzhsTYmaDcqnE7wvR+1fWvy+YCMQTwtmvNbpKnfFH3wacPNKttQ7BcpFrOi4Ux+Bw+", + "ScryptObject": { + "Salt": "RgvSW4AxpA9z/Gb6RCCmKeA4A2vC+l0vu9DnEKIWQZU=", + "N": 1024, + "R": 8, + "P": 1, + "KeyLen": 32 + }, + "Version": 2, + "FeatureFlags": [ + "GCMIV128", + "PlaintextNames", + "AESSIV" + ] +} \ No newline at end of file diff --git a/tests/example_filesystems/v1.1-reverse-plaintextnames/abs b/tests/example_filesystems/v1.1-reverse-plaintextnames/abs new file mode 120000 index 0000000..e1740fa --- /dev/null +++ b/tests/example_filesystems/v1.1-reverse-plaintextnames/abs @@ -0,0 +1 @@ +/a/b/c/d \ No newline at end of file diff --git a/tests/example_filesystems/v1.1-reverse-plaintextnames/longname_255_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b/tests/example_filesystems/v1.1-reverse-plaintextnames/longname_255_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx new file mode 100644 index 0000000..68300b8 --- /dev/null +++ b/tests/example_filesystems/v1.1-reverse-plaintextnames/longname_255_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -0,0 +1 @@ +It works! diff --git a/tests/example_filesystems/v1.1-reverse-plaintextnames/rel b/tests/example_filesystems/v1.1-reverse-plaintextnames/rel new file mode 120000 index 0000000..8279c75 --- /dev/null +++ b/tests/example_filesystems/v1.1-reverse-plaintextnames/rel @@ -0,0 +1 @@ +status.txt \ No newline at end of file diff --git a/tests/example_filesystems/v1.1-reverse-plaintextnames/status.txt b/tests/example_filesystems/v1.1-reverse-plaintextnames/status.txt new file mode 100644 index 0000000..68300b8 --- /dev/null +++ b/tests/example_filesystems/v1.1-reverse-plaintextnames/status.txt @@ -0,0 +1 @@ +It works! -- cgit v1.2.3