title: Android L - No peer certificate
body: <p>I've developed a small app that connect to my server using SSL with a self signed certificate. To make it work, i've loaded my certificate in a custom keystore using the BouncyCastleProvider, and imported the certificate in my custom SSLSocketFactory.
  Everythink works great from android 2.3 (minimum sdk) up to 4.4.4. But in android L (Preview) my app fails with:</p>
  
  <blockquote>
    <p>Tue Aug 12 14:34:40 BRT 2014 : 
    javax.net.ssl.SSLPeerUnverifiedException: No peer certificate     at
    com.android.org.conscrypt.SSLNullSession.getPeerCertificates(SSLNullSession.java:104)
      at
    org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
      at
    org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:388)
      at
    org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
      at
    org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
      at
    org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
      at
    org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
      at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
      at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
      at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    ....</p>
  </blockquote>
  
  <p>and i have absolutely no idea how to fix it. 
  Any help would be really appreciated.</p>