@Test public void testLaxHostnameVerification() throws Exception { final Host host = new Host(new S3Protocol(), new S3Protocol().getDefaultHostname(), new Credentials( System.getProperties().getProperty("s3.key"), System.getProperties().getProperty("s3.secret") )); final KeychainX509TrustManager trust = new KeychainX509TrustManager(new DisabledCertificateTrustCallback(), new DefaultTrustManagerHostnameCallback(host), new DisabledCertificateStore() { @Override public boolean verify(final CertificateTrustCallback prompt, final String hostname, final List<X509Certificate> certificates) throws CertificateException { assertEquals("ch.s3.amazonaws.com", hostname); return true; } }); final S3Session session = new S3Session(host, new DisabledX509TrustManager(), new KeychainX509KeyManager(new DisabledCertificateIdentityCallback(), host, new DisabledCertificateStore())); final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() { @Override public Credentials prompt(final Host bookmark, final String username, final String title, final String reason, final LoginOptions options) { fail(reason); return null; } }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener()); login.check(session, PathCache.empty(), new DisabledCancelCallback()); new S3ObjectListService(session).list( new Path("test-us-east-1-cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory)), new DisabledListProgressListener()); }
@Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); @Override ListService withCache(final Cache<Path> cache); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter, final int chunksize); }
S3ObjectListService extends S3AbstractListService implements ListService { @Override public AttributedList<Path> list(final Path directory, final ListProgressListener listener) throws BackgroundException { return this.list(directory, listener, String.valueOf(Path.DELIMITER)); } S3ObjectListService(final S3Session session); @Override ListService withCache(final Cache<Path> cache); @Override AttributedList<Path> list(final Path directory, final ListProgressListener listener); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter); AttributedList<Path> list(final Path directory, final ListProgressListener listener, final String delimiter, final int chunksize);  }