Skip to content

Commit 3bdfa7e

Browse files
ylangiscdkocher
authored andcommitted
Base64URL encoded seeds.
1 parent dd11e8d commit 3bdfa7e

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

s3/src/test/java/ch/cyberduck/core/cryptomator/UVFIntegrationTest.java

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import ch.cyberduck.core.features.AttributesFinder;
2121
import ch.cyberduck.core.features.Bulk;
2222
import ch.cyberduck.core.features.Delete;
23+
import ch.cyberduck.core.features.Directory;
2324
import ch.cyberduck.core.features.Move;
2425
import ch.cyberduck.core.features.Read;
2526
import ch.cyberduck.core.features.Write;
@@ -104,14 +105,14 @@ public void listMinio() throws BackgroundException, IOException {
104105
" \"fileFormat\": \"AES-256-GCM-32k\",\n" +
105106
" \"nameFormat\": \"AES-SIV-512-B64URL\",\n" +
106107
" \"seeds\": {\n" +
107-
" \"HDm38g\": \"ypeBEsobvcr6wjGzmiPcTaeG7/gUfE5yuYB3ha/uSLs=\",\n" +
108-
" \"gBryKw\": \"PiPoFgA5WUoziU9lZOGxNIu9egCI1CxKy3PurtWcAJ0=\",\n" +
109-
" \"QBsJFg\": \"Ln0sA6lQeuJl7PW1NWiFpTOTogKdJBOUmXJloaJa78Y=\"\n" +
108+
" \"HDm38g\": \"ypeBEsobvcr6wjGzmiPcTaeG7_gUfE5yuYB3ha_uSLs\",\n" +
109+
" \"gBryKw\": \"PiPoFgA5WUoziU9lZOGxNIu9egCI1CxKy3PurtWcAJ0\",\n" +
110+
" \"QBsJFg\": \"Ln0sA6lQeuJl7PW1NWiFpTOTogKdJBOUmXJloaJa78Y\"\n" +
110111
" },\n" +
111112
" \"initialSeed\": \"HDm38i\",\n" +
112113
" \"latestSeed\": \"QBsJFo\",\n" +
113114
" \"kdf\": \"HKDF-SHA512\",\n" +
114-
" \"kdfSalt\": \"NIlr89R7FhochyP4yuXZmDqCnQ0dBB3UZ2D+6oiIjr8=\",\n" +
115+
" \"kdfSalt\": \"NIlr89R7FhochyP4yuXZmDqCnQ0dBB3UZ2D-6oiIjr8\",\n" +
115116
" \"org.example.customfield\": 42\n" +
116117
"}";
117118

@@ -187,18 +188,29 @@ public Credentials prompt(final Host bookmark, final String title, final String
187188
new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
188189
new Path("/cyberduckbucket/subdir/bar.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)))),
189190
new HashSet<>(list.toList()));
190-
191191
assertEquals(new String(expected), readFile(storage, new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted))));
192192
}
193+
{
194+
final Path mkdir = storage.getFeature(Directory.class).mkdir(new Path("/cyberduckbucket/subdir/subsubdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.placeholder, AbstractPath.Type.decrypted)), new TransferStatus());
195+
final AttributedList<Path> list = storage.getFeature(ListService.class).list(new Path("/cyberduckbucket/subdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.placeholder, AbstractPath.Type.decrypted)), new DisabledListProgressListener());
196+
storage.getFeature(ListService.class).list(bucket, new DisabledListProgressListener());
197+
assertEquals(
198+
new HashSet<>(Arrays.asList(
199+
new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
200+
new Path("/cyberduckbucket/subdir/bar.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
201+
new Path("/cyberduckbucket/subdir/subsubdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.decrypted)))),
202+
new HashSet<>(list.toList()));
203+
}
193204
{
194205
storage.getFeature(Delete.class).delete(Collections.singletonList(new Path("/cyberduckbucket/subdir/bar.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted))), new DisabledPasswordCallback(), new Delete.DisabledCallback());
195206
final AttributedList<Path> list = storage.getFeature(ListService.class).list(new Path("/cyberduckbucket/subdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.placeholder, AbstractPath.Type.decrypted)), new DisabledListProgressListener());
196-
assertEquals(1, list.size());
207+
assertEquals(2, list.size());
197208
assertTrue(Arrays.toString(list.toArray()), list.contains(new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted))));
198209
assertEquals(
199-
new HashSet<>(Collections.singletonList(
200-
new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted))
201-
)),
210+
new HashSet<>(Arrays.asList(
211+
new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
212+
new Path("/cyberduckbucket/subdir/subsubdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.decrypted)))
213+
),
202214
new HashSet<>(list.toList()));
203215
}
204216
{
@@ -212,7 +224,8 @@ public Credentials prompt(final Host bookmark, final String title, final String
212224
assertEquals(
213225
new HashSet<>(Arrays.asList(
214226
new Path("/cyberduckbucket/subdir/alice.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
215-
new Path("/cyberduckbucket/subdir/Dave.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)))
227+
new Path("/cyberduckbucket/subdir/Dave.txt", EnumSet.of(AbstractPath.Type.file, AbstractPath.Type.decrypted)),
228+
new Path("/cyberduckbucket/subdir/subsubdir", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.decrypted)))
216229
),
217230
new HashSet<>(listSubDir.toList()));
218231
final AttributedList<Path> listHome = storage.getFeature(ListService.class).list(new Path("/cyberduckbucket/", EnumSet.of(AbstractPath.Type.directory, AbstractPath.Type.placeholder, AbstractPath.Type.decrypted)), new DisabledListProgressListener());

0 commit comments

Comments
 (0)