@Test(expected = SSLNegotiateException.class) @Ignore public void testMutualTlsUnknownCA() throws Exception { final Host host = new Host(new DAVSSLProtocol(), "auth.startssl.com"); final DAVSession session = new DAVSession(host, new DefaultX509TrustManager(), new KeychainX509KeyManager(new DisabledCertificateIdentityCallback(), host, new DisabledCertificateStore() { @Override public X509Certificate choose(final CertificateIdentityCallback prompt, final String[] keyTypes, final Principal[] issuers, final Host bookmark) throws ConnectionCanceledException { assertEquals("auth.startssl.com", bookmark.getHostname()); assertTrue(Arrays.asList(issuers).contains(new X500Principal("" + "CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL"))); assertTrue(Arrays.asList(issuers).contains(new X500Principal("" + "CN=StartCom Class 1 Primary Intermediate Client CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL"))); assertTrue(Arrays.asList(issuers).contains(new X500Principal("" + "CN=StartCom Class 2 Primary Intermediate Client CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL"))); assertTrue(Arrays.asList(issuers).contains(new X500Principal("" + "CN=StartCom Class 3 Primary Intermediate Client CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL"))); throw new ConnectionCanceledException(); } })); final LoginConnectionService c = new LoginConnectionService( new DisabledLoginCallback() { @Override public Credentials prompt(final Host bookmark, String username, String title, String reason, LoginOptions options) { return new Credentials(); } }, new DisabledHostKeyCallback(), new DisabledPasswordStore(), new DisabledProgressListener()); c.connect(session, PathCache.empty(), new DisabledCancelCallback()); }
@Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); @Override DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override boolean alert(final ConnectionCallback callback); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type); }
DAVSession extends HttpSession<DAVClient> { @Override public DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { final HttpClientBuilder pool = builder.build(proxy, this, prompt); pool.setRedirectStrategy(new DAVRedirectStrategy(redirect)); return new DAVClient(new HostUrlProvider().withUsername(false).get(host), pool); } DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key);  DAVSession(final Host host, final X509TrustManager trust, final X509KeyManager key, final RedirectCallback redirect); @Override DAVClient connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override boolean alert(final ConnectionCallback callback); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type);  }