Skip to content

Commit aafe840

Browse files
committed
Add parameter to retrieve private key for mTLS.
1 parent 675164d commit aafe840

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/test/java/ch/cyberduck/core/KeychainLoginServiceTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import ch.cyberduck.core.exception.LoginCanceledException;
55
import ch.cyberduck.core.preferences.PreferencesFactory;
66
import ch.cyberduck.core.proxy.DisabledProxyFinder;
7+
import ch.cyberduck.core.ssl.DefaultX509KeyManager;
78
import ch.cyberduck.core.threading.CancelCallback;
89

910
import org.junit.Test;
@@ -51,7 +52,8 @@ else if(1 == i) {
5152
@Test(expected = LoginCanceledException.class)
5253
public void testCancel() throws Exception {
5354
LoginService l = new KeychainLoginService(new DisabledPasswordStore());
54-
l.validate(new NullSession(new Host(new TestProtocol(), "h")), new DisabledLoginCallback(), new LoginOptions());
55+
l.validate(new Host(new TestProtocol(), "h"),
56+
new DefaultX509KeyManager(), new DisabledLoginCallback(), new LoginOptions());
5557
}
5658

5759
@Test
@@ -68,7 +70,7 @@ public String findLoginPassword(final Host bookmark) {
6870
final Credentials credentials = new Credentials();
6971
credentials.setUsername("u");
7072
final Host host = new Host(new TestProtocol(), "test.cyberduck.ch", credentials);
71-
l.validate(new NullSession(host), new DisabledLoginCallback(), new LoginOptions(host.getProtocol()));
73+
l.validate(host, new DefaultX509KeyManager(), new DisabledLoginCallback(), new LoginOptions(host.getProtocol()));
7274
assertTrue(keychain.get());
7375
assertFalse(host.getCredentials().isSaved());
7476
assertEquals("P", host.getCredentials().getPassword());

0 commit comments

Comments
 (0)