Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have this functionality in exchangeIt, which connects to Microsoft exchange via WebDav. Here's some code to create an HttpClient which will connect to self signed cert's via SSL:</p> <pre><code>SchemeRegistry schemeRegistry = new SchemeRegistry(); // http scheme schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); // https scheme schemeRegistry.register(new Scheme("https", new EasySSLSocketFactory(), 443)); HttpParams params = new BasicHttpParams(); params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30); params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(30)); params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry); </code></pre> <p>The EasySSLSocketFactory is <a href="http://code.google.com/p/exchangeit/source/browse/trunk/src/com/byarger/exchangeit/EasySSLSocketFactory.java?spec=svn23&amp;r=23" rel="nofollow noreferrer">here</a>, and the EasyX509TrustManager is <a href="http://code.google.com/p/exchangeit/source/browse/trunk/src/com/byarger/exchangeit/EasyX509TrustManager.java?spec=svn23&amp;r=23" rel="nofollow noreferrer">here</a>.</p> <p>The code for exchangeIt is open source, and hosted on googlecode <a href="http://code.google.com/p/exchangeit" rel="nofollow noreferrer">here</a>, if you have any issues. I'm not actively working on it anymore, but the code should work.</p> <p>Note that since Android 2.2 the process has changed a bit, so check <a href="https://stackoverflow.com/questions/2899079/custom-ssl-handling-stopped-working-on-android-2-2-froyo">this</a> to make the code above work.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload