title: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. Android 2.3
body: <p>In my server (production server), I have a goDaddy ssl certificate.
  I have both iOS and Android apps connecting with the server, iOS connecting with no problems, android with versions 4.* everything is good, but with devices with 2.3.* I always get a SSLHandshakeException.</p>
  <p>I did exactly like on Android Developers page (<a href="https://developer.android.com/training/articles/security-ssl.html" rel="nofollow noreferrer">https://developer.android.com/training/articles/security-ssl.html</a>).</p>
  <p>I already saw similar threads here in Stack Overflow (<a href="https://stackoverflow.com/questions/21306336/android-2-3-x-javax-net-ssl-sslhandshakeexception-java-security-cert-certpathva">here</a>) but none is helping.</p>
  <p>Then I saw <a href="https://code.google.com/p/android/issues/detail?id=22171" rel="nofollow noreferrer">this</a> thread talking about Extended Key Usage, but when debugging I get the following information:</p>
  <pre><code>[2]: OID: 2.5.29.37, Critical: false
  Extended Key Usage: [ &quot;1.3.6.1.5.5.7.3.1&quot;, &quot;1.3.6.1.5.5.7.3.2&quot; ]
  </code></pre>
  <p>So I guess the certificate is not &quot;forcing&quot; Extended Key Usage.</p>
  <p>Also on <a href="https://stackoverflow.com/questions/9574870/no-peer-certificate-error-in-android-2-3-but-not-in-4">this</a> thread there are some other possible causes such as date/time being completely wrong, which are all not existent.</p>
  <p>Taking that into consideration, I now don't know where the problem might be.</p>
  <p>Any suggestions?</p>
  <p><strong>EDIT:</strong>
  StackTrace below:</p>
  <pre><code>08-04 16:54:30.139: W/System.err(4832): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
  08-04 16:54:30.149: W/System.err(4832):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:161)
  08-04 16:54:30.149: W/System.err(4832):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:664)
  08-04 16:54:30.149: W/System.err(4832):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
  08-04 16:54:30.159: W/System.err(4832):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:474)
  </code></pre>