Search in sources :

Example 1 with DisabledHostKeyCallback

use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.

the class AbstractBrickTest method setup.

@Before
public void setup() throws Exception {
    final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new BrickProtocol())));
    final Profile profile = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Brick.cyberduckprofile"));
    final Host host = new Host(profile, "mountainduck.files.com", new Credentials(System.getProperties().getProperty("brick.user"), System.getProperties().getProperty("brick.password")));
    session = new BrickSession(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
    final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() {

        @Override
        public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) {
            fail(reason);
            return null;
        }
    }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
    login.check(session, new DisabledCancelCallback());
}
Also used : DisabledProgressListener(ch.cyberduck.core.DisabledProgressListener) LoginConnectionService(ch.cyberduck.core.LoginConnectionService) Host(ch.cyberduck.core.Host) ProfilePlistReader(ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader) Profile(ch.cyberduck.core.Profile) ProtocolFactory(ch.cyberduck.core.ProtocolFactory) LoginOptions(ch.cyberduck.core.LoginOptions) DisabledCancelCallback(ch.cyberduck.core.DisabledCancelCallback) DisabledHostKeyCallback(ch.cyberduck.core.DisabledHostKeyCallback) DisabledLoginCallback(ch.cyberduck.core.DisabledLoginCallback) DefaultX509KeyManager(ch.cyberduck.core.ssl.DefaultX509KeyManager) DisabledPasswordStore(ch.cyberduck.core.DisabledPasswordStore) Credentials(ch.cyberduck.core.Credentials) DefaultX509TrustManager(ch.cyberduck.core.ssl.DefaultX509TrustManager) Before(org.junit.Before)

Example 2 with DisabledHostKeyCallback

use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.

the class AbtractBoxTest method setup.

@Before
public void setup() throws Exception {
    final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new BoxProtocol())));
    final Profile profile = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Box.cyberduckprofile"));
    final Host host = new Host(profile, profile.getDefaultHostname(), new Credentials("cyberduck"));
    session = new BoxSession(host, new DefaultX509TrustManager(), new DefaultX509KeyManager());
    final LoginConnectionService login = new LoginConnectionService(new DisabledLoginCallback() {

        @Override
        public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) {
            fail(reason);
            return null;
        }
    }, new DisabledHostKeyCallback(), new TestPasswordStore(), new DisabledProgressListener());
    login.check(session, new DisabledCancelCallback());
}
Also used : DisabledProgressListener(ch.cyberduck.core.DisabledProgressListener) LoginConnectionService(ch.cyberduck.core.LoginConnectionService) Host(ch.cyberduck.core.Host) ProfilePlistReader(ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader) Profile(ch.cyberduck.core.Profile) ProtocolFactory(ch.cyberduck.core.ProtocolFactory) LoginOptions(ch.cyberduck.core.LoginOptions) DisabledCancelCallback(ch.cyberduck.core.DisabledCancelCallback) DisabledHostKeyCallback(ch.cyberduck.core.DisabledHostKeyCallback) DisabledLoginCallback(ch.cyberduck.core.DisabledLoginCallback) DefaultX509KeyManager(ch.cyberduck.core.ssl.DefaultX509KeyManager) Credentials(ch.cyberduck.core.Credentials) DefaultX509TrustManager(ch.cyberduck.core.ssl.DefaultX509TrustManager) Before(org.junit.Before)

Example 3 with DisabledHostKeyCallback

use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.

the class RemoteProfilesFinderTest method find.

@Test
public void find() throws Exception {
    final ProtocolFactory protocols = new ProtocolFactory(new HashSet<>(Arrays.asList(new TestProtocol() {

        @Override
        public String getIdentifier() {
            return "s3";
        }

        @Override
        public Type getType() {
            return Type.s3;
        }

        @Override
        public boolean isEnabled() {
            return false;
        }
    }, new TestProtocol() {

        @Override
        public String getIdentifier() {
            return "davs";
        }

        @Override
        public Type getType() {
            return Type.dav;
        }

        @Override
        public boolean isEnabled() {
            return false;
        }
    })));
    final ProfilePlistReader reader = new ProfilePlistReader(protocols);
    final TestProtocol protocol = new TestProtocol() {

        @Override
        public String getIdentifier() {
            return "davs";
        }

        @Override
        public Scheme getScheme() {
            return Scheme.https;
        }

        @Override
        public Type getType() {
            return Type.dav;
        }

        @Override
        public boolean isEnabled() {
            return false;
        }
    };
    final Host host = new HostParser(protocols, protocol).get("https://svn.cyberduck.io/trunk/profiles");
    final NullSession session = new NullSession(host);
    session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
    final RemoteProfilesFinder finder = new RemoteProfilesFinder(session);
    final Set<ProfileDescription> stream = finder.find();
    assertTrue(stream.isEmpty());
    session.close();
}
Also used : TestProtocol(ch.cyberduck.core.TestProtocol) NullSession(ch.cyberduck.core.NullSession) Host(ch.cyberduck.core.Host) ProfilePlistReader(ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader) ProtocolFactory(ch.cyberduck.core.ProtocolFactory) DisabledCancelCallback(ch.cyberduck.core.DisabledCancelCallback) DisabledHostKeyCallback(ch.cyberduck.core.DisabledHostKeyCallback) DisabledLoginCallback(ch.cyberduck.core.DisabledLoginCallback) HostParser(ch.cyberduck.core.HostParser) Test(org.junit.Test)

Example 4 with DisabledHostKeyCallback

use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.

the class AbstractS3DirectSDSTest method setup.

@Before
public void setup() throws Exception {
    session = new SDSSession(new Host(new SDSProtocol(), "duck.dracoon.com", new Credentials(System.getProperties().getProperty("sds.user"), System.getProperties().getProperty("sds.key"))), new DisabledX509TrustManager(), new DefaultX509KeyManager());
    session.enableMetrics();
    final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback() {

        @Override
        public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) throws LoginCanceledException {
            throw new LoginCanceledException();
        }
    }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
    connect.check(session, new DisabledCancelCallback());
}
Also used : DisabledProgressListener(ch.cyberduck.core.DisabledProgressListener) DisabledX509TrustManager(ch.cyberduck.core.ssl.DisabledX509TrustManager) LoginConnectionService(ch.cyberduck.core.LoginConnectionService) LoginCanceledException(ch.cyberduck.core.exception.LoginCanceledException) Host(ch.cyberduck.core.Host) LoginOptions(ch.cyberduck.core.LoginOptions) DisabledCancelCallback(ch.cyberduck.core.DisabledCancelCallback) DisabledHostKeyCallback(ch.cyberduck.core.DisabledHostKeyCallback) DisabledLoginCallback(ch.cyberduck.core.DisabledLoginCallback) DefaultX509KeyManager(ch.cyberduck.core.ssl.DefaultX509KeyManager) DisabledPasswordStore(ch.cyberduck.core.DisabledPasswordStore) Credentials(ch.cyberduck.core.Credentials) Before(org.junit.Before)

Example 5 with DisabledHostKeyCallback

use of ch.cyberduck.core.DisabledHostKeyCallback in project cyberduck by iterate-ch.

the class AbstractSDSTest method setup.

@Before
public void setup() throws Exception {
    session = new SDSSession(new Host(new SDSProtocol(), "duck.dracoon.com", new Credentials(System.getProperties().getProperty("sds.user"), System.getProperties().getProperty("sds.key"))), new DisabledX509TrustManager(), new DefaultX509KeyManager());
    session.enableMetrics();
    final LoginConnectionService connect = new LoginConnectionService(new DisabledLoginCallback() {

        @Override
        public Credentials prompt(final Host bookmark, final String title, final String reason, final LoginOptions options) throws LoginCanceledException {
            throw new LoginCanceledException();
        }
    }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener());
    connect.check(session, new DisabledCancelCallback());
}
Also used : DisabledProgressListener(ch.cyberduck.core.DisabledProgressListener) DisabledX509TrustManager(ch.cyberduck.core.ssl.DisabledX509TrustManager) LoginConnectionService(ch.cyberduck.core.LoginConnectionService) LoginCanceledException(ch.cyberduck.core.exception.LoginCanceledException) Host(ch.cyberduck.core.Host) LoginOptions(ch.cyberduck.core.LoginOptions) DisabledCancelCallback(ch.cyberduck.core.DisabledCancelCallback) DisabledHostKeyCallback(ch.cyberduck.core.DisabledHostKeyCallback) DisabledLoginCallback(ch.cyberduck.core.DisabledLoginCallback) DefaultX509KeyManager(ch.cyberduck.core.ssl.DefaultX509KeyManager) DisabledPasswordStore(ch.cyberduck.core.DisabledPasswordStore) Credentials(ch.cyberduck.core.Credentials) Before(org.junit.Before)

Aggregations

DisabledHostKeyCallback (ch.cyberduck.core.DisabledHostKeyCallback)189 DisabledLoginCallback (ch.cyberduck.core.DisabledLoginCallback)189 DisabledCancelCallback (ch.cyberduck.core.DisabledCancelCallback)186 Host (ch.cyberduck.core.Host)177 Test (org.junit.Test)167 Credentials (ch.cyberduck.core.Credentials)134 IntegrationTest (ch.cyberduck.test.IntegrationTest)127 Path (ch.cyberduck.core.Path)126 DefaultX509KeyManager (ch.cyberduck.core.ssl.DefaultX509KeyManager)96 TransferStatus (ch.cyberduck.core.transfer.TransferStatus)87 DisabledX509TrustManager (ch.cyberduck.core.ssl.DisabledX509TrustManager)78 Delete (ch.cyberduck.core.features.Delete)73 DisabledConnectionCallback (ch.cyberduck.core.DisabledConnectionCallback)53 ProtocolFactory (ch.cyberduck.core.ProtocolFactory)52 Scheme (ch.cyberduck.core.Scheme)52 Local (ch.cyberduck.core.Local)51 ProfilePlistReader (ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader)51 DisabledProgressListener (ch.cyberduck.core.DisabledProgressListener)48 Profile (ch.cyberduck.core.Profile)48 LoginConnectionService (ch.cyberduck.core.LoginConnectionService)39