I m getting this error while trying to establish a https connection...
03-11 11:59:39.151: WARN/System.err(4057): javax.net.ssl.SSLException: Not trusted server certificate
03-11 11:59:39.222: WARN/System.err(4057): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
03-11 11:59:39.232: WARN/System.err(4057): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
03-11 11:59:39.232: WARN/System.err(4057): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
03-11 11:59:39.241: WARN/System.err(405开发者_JAVA百科7): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
03-11 11:59:39.261: WARN/System.err(4057): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
03-11 11:59:39.261: WARN/System.err(4057): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
03-11 11:59:39.270: WARN/System.err(4057): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
03-11 11:59:39.270: WARN/System.err(4057): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
03-11 11:59:39.282: WARN/System.err(4057): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
03-11 11:59:39.282: WARN/System.err(4057): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
03-11 11:59:39.282: WARN/System.err(4057): at com.infy.pdf.MyAccount$3.onDownloadStart(MyAccount.java:82)
03-11 11:59:39.282: WARN/System.err(4057): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:387)
03-11 11:59:39.282: WARN/System.err(4057): at android.os.Handler.dispatchMessage(Handler.java:99)
03-11 11:59:39.282: WARN/System.err(4057): at android.os.Looper.loop(Looper.java:123)
03-11 11:59:39.282: WARN/System.err(4057): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-11 11:59:39.282: WARN/System.err(4057): at java.lang.reflect.Method.invokeNative(Native Method)
03-11 11:59:39.462: DEBUG/NativeCrypto(4057): Freeing OpenSSL session
03-11 11:59:39.472: DEBUG/dalvikvm(4057): GC_FOR_MALLOC freed 12447 objects / 621928 bytes in 184ms
03-11 11:59:39.491: WARN/System.err(4057): at java.lang.reflect.Method.invoke(Method.java:521)
03-11 11:59:39.491: WARN/System.err(4057): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-11 11:59:39.501: WARN/System.err(4057): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-11 11:59:39.501: WARN/System.err(4057): at dalvik.system.NativeStart.main(Native Method)
03-11 11:59:39.520: WARN/System.err(4057): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
03-11 11:59:39.520: WARN/System.err(4057): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)
03-11 11:59:39.532: WARN/System.err(4057): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)
03-11 11:59:39.540: WARN/System.err(4057): ... 19 more
03-11 11:59:39.540: WARN/System.err(4057): Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
03-11 11:59:39.631: WARN/System.err(4057): at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:149)
03-11 11:59:39.631: WARN/System.err(4057): at java.security.cert.CertPathValidator.validate(CertPathValidator.java:202)
03-11 11:59:39.631: WARN/System.err(4057): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)
Does anybody have any idea how to tackle this error..
Probably self signed key problem.
Https Connection Android
Self-signed SSL acceptance on Android
精彩评论