AndroidHttpClient中的SSLException

时间:2012-08-10 09:14:36

标签: android sslexception

我正在使用AndroidHttpClient通过https连接到我的服务器。证书是可以的,但有时在糟糕的互联网连接上会抛出异常。网址总是一样的。

I/ActivityManager(  300): Displayed ru.mw.android/.FavouritesActivity: +387ms
W/System.err( 2045): javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x5c02f980: I/O error during system call, Connection reset by peer
W/System.err( 2045):    at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
W/System.err( 2045):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:395)
W/System.err( 2045):    at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:189)
W/System.err( 2045):    at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:332)
W/System.err( 2045):    at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:375)
W/System.err( 2045):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
W/System.err( 2045):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err( 2045):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err( 2045):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
W/System.err( 2045):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err( 2045):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err( 2045):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err( 2045):    at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:252)

0 个答案:

没有答案