summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-24 13:50:07 +0200
committerJakob Unterwurzacher2021-08-24 13:50:07 +0200
commitd70875aaa970e9d62f3b188c874da229636325dd (patch)
tree8383f512fb878afb62c88fa9fb8a6547d1e634c5 /tests
parent62ed081c5e3f92855784dea24f14b377de98c511 (diff)
tests/example_filesystems: add deterministic-names and xchacha
Diffstat (limited to 'tests')
-rw-r--r--tests/example_filesystems/example_filesystems_test.go44
l---------tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ1
l---------tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw1
-rw-r--r--tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf19
-rw-r--r--tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZobin0 -> 60 bytes
-rw-r--r--tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name1
-rw-r--r--tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Qbin0 -> 60 bytes
l---------tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q1
-rw-r--r--tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQbin0 -> 68 bytes
l---------tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w1
-rw-r--r--tests/example_filesystems/v2.2-xchacha/gocryptfs.conf20
-rw-r--r--tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv1
-rw-r--r--tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Tsbin0 -> 68 bytes
-rw-r--r--tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name1
14 files changed, 90 insertions, 0 deletions
diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go
index b07b5f3..7ecae81 100644
--- a/tests/example_filesystems/example_filesystems_test.go
+++ b/tests/example_filesystems/example_filesystems_test.go
@@ -382,3 +382,47 @@ func TestExampleFSv13reverse(t *testing.T) {
test_helpers.UnmountPanic(dirC)
test_helpers.UnmountPanic(dirB)
}
+
+// gocryptfs v2.2 introduced -deterministic-names
+func TestExampleFSv22deterministicNames(t *testing.T) {
+ cDir := "v2.2-deterministic-names"
+ pDir := test_helpers.TmpDir + "/" + cDir
+ cDir = tmpFsPath + cDir
+ err := os.Mkdir(pDir, 0777)
+ if err != nil {
+ t.Fatal(err)
+ }
+ test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+
+ pDir = pDir + "_m"
+ test_helpers.MountOrFatal(t, cDir, pDir, "-deterministic-names", "-masterkey",
+ "722733f5-b0f399f5-5465ad7a-f0bed125-"+
+ "e82de7b4-045e7608-a5e5c78e-04a1a61e",
+ opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+}
+
+// gocryptfs v2.2 introduced -xchacha
+func TestExampleFSv22xchacha(t *testing.T) {
+ cDir := "v2.2-xchacha"
+ pDir := test_helpers.TmpDir + "/" + cDir
+ cDir = tmpFsPath + cDir
+ err := os.Mkdir(pDir, 0777)
+ if err != nil {
+ t.Fatal(err)
+ }
+ test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+
+ pDir = pDir + "_m"
+ test_helpers.MountOrFatal(t, cDir, pDir, "-xchacha", "-masterkey",
+ "44670e7e-32475bfc-bdfb8a8c-be17a767-"+
+ "0679cac0-be705d8c-af41c411-28c40f26",
+ opensslOpt)
+ checkExampleFSLongnames(t, pDir)
+ test_helpers.UnmountPanic(pDir)
+}
diff --git a/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ b/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ
new file mode 120000
index 0000000..17ab1e5
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ
@@ -0,0 +1 @@
+-G4ErcfZuyo50LjLiEyJ3AAf4YP5UtwWWfvk9wZw4_SdQZoKYgoi9ZBh \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw b/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw
new file mode 120000
index 0000000..a4da7a8
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw
@@ -0,0 +1 @@
+KhXaRw-75Nq9gID4wqfU6CJ_kk-3RSSUiWxuhTFnlM6cjbBmRzcJlw \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf
new file mode 100644
index 0000000..6a91dfe
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf
@@ -0,0 +1,19 @@
+{
+ "Creator": "gocryptfs v2.1-27-gabaa129-dirty.xchacha",
+ "EncryptedKey": "RnoIHKZ0FW4hGgovIbo6ictZt6eISBCFAVQjIelO1In5GdWE3j6svtOirIg2xHpT9hwOSplVg8MgV0Y5Qw0TyQ==",
+ "ScryptObject": {
+ "Salt": "yzBcjuwLGUjscVFL01kZAAfCk+9LpSl1CqDhavxOt+Y=",
+ "N": 1024,
+ "R": 8,
+ "P": 1,
+ "KeyLen": 32
+ },
+ "Version": 2,
+ "FeatureFlags": [
+ "HKDF",
+ "GCMIV128",
+ "EMENames",
+ "LongNames",
+ "Raw64"
+ ]
+}
diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo
new file mode 100644
index 0000000..5124052
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo
Binary files differ
diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name
new file mode 100644
index 0000000..55b86be
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name
@@ -0,0 +1 @@
+tMYO1CJjvdz5B37Kt5EKHCnq41xnN7iNWJPLLUOiQanOQN8UF6t-fOWcK-qF9PiYrhojc-7kQ41QqMTut9LpqwMa_Oc2S4C4CqVzK-ct6WHt-eZNSUWBt54EcxAbpzvm4Z_2_OFWhaPtkw2L7i4XozCOS33SMHn2rp4hX2ySOsStQX3C6AWiNWzTByk6VEeak6DDEYQPMiT0qmJkapYZ3dD7KNEh7ae1-yX1oX8DHhhKWf5OUgDU_UzDZ_fbD-_qMAV0mhFfoJ97oaskNrw1uXdX70ph3Qcb1psRynh5gQC7WaN6yX7bVJYUZKnulrp7spo04f7Neel5tENhQ3anpQ \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q b/tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q
new file mode 100644
index 0000000..fcd52f6
--- /dev/null
+++ b/tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q
Binary files differ
diff --git a/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q b/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q
new file mode 120000
index 0000000..06f46b6
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q
@@ -0,0 +1 @@
+G4op4SX2D3wVUDQedEsz6n3fm8ry2-EFQRx3HUp5kLyNKr2hA3N3iuDWhRxilY77 \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ b/tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ
new file mode 100644
index 0000000..d41ac60
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ
Binary files differ
diff --git a/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w b/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w
new file mode 120000
index 0000000..6eddb24
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w
@@ -0,0 +1 @@
+ymrBbzzB60kz8FNY78U7GmHlZmjUIS7iyoJsI3oQ1ISm10w6xDu6lL4eE2iYOBYJv7o \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf b/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf
new file mode 100644
index 0000000..a4ac3c2
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf
@@ -0,0 +1,20 @@
+{
+ "Creator": "gocryptfs v2.1-27-gabaa129-dirty.xchacha",
+ "EncryptedKey": "6pVNGTIq5c4uXu90ZBjg2jKPvSqYc6gEfQ3/dEaMqKhd0CnaEYEm6+4oyrIfQkn0X7/hkW/HaCAqK0G0rcv1nw==",
+ "ScryptObject": {
+ "Salt": "AjIc6CkWvrd4/41pei15ulBKIcptIzvvJuCI+YB8pkA=",
+ "N": 1024,
+ "R": 8,
+ "P": 1,
+ "KeyLen": 32
+ },
+ "Version": 2,
+ "FeatureFlags": [
+ "HKDF",
+ "XChaCha20Poly1305",
+ "DirIV",
+ "EMENames",
+ "LongNames",
+ "Raw64"
+ ]
+}
diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv b/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv
new file mode 100644
index 0000000..42b180e
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv
@@ -0,0 +1 @@
+„ #¾UÒÇ·ÉA‹öVt \ No newline at end of file
diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts b/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts
new file mode 100644
index 0000000..f693b9c
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts
Binary files differ
diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name b/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name
new file mode 100644
index 0000000..7010b6e
--- /dev/null
+++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name
@@ -0,0 +1 @@
+nZEOq0Run8Aon2Q741xQE6caBtJUhfQQYSCcuEDPQW9vjFp13rOjJ_twr0h7XBmLIkAVta-adlHq3Yd-mOj5C31lO9oWywXC04igbBRXgySkVoRoM6I0NetO0fUTCqbZswEc0NNynmT10yY6BDL9WNr0EYysp9smImHYFj43tnLz0YnPD1bQvjsQyb4Gp8wBurqODbzKUln62x2U73QCUzKnhgbgIQpe6NbKSWbHts7y576BOBhqevLnpjM3o6iHnjLbd0lQnRncb_3nZKKgF7Ik0yOzWW9x1Dn9YiTmA9lg5NyoFidCDKfvAEuzlyw9_hV5XAbhT3j_oxv62G4q4Q \ No newline at end of file