SSL with Android 2.2 and 2.3 - android

If I hit a https url in Android 2.3, does it automatically use SSL? I'm having trouble with an application I've written between Android 2.2 and Android 2.3. When I hit the https url on Android 2.2, it bombs out and gives me the below, but when I use the same code on Android 2.3, I get nothing. So from the reading I've done around what I'm thinking is the type of certificate at this url is a type accepted by Android 2.3 by default, but not by Android 2.2, is that right?
05-10 13:04:37.659: WARN/System.err(2177): javax.net.ssl.SSLException: Not trusted server certificate
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
05-10 13:04:37.659: WARN/System.err(2177): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
05-10 13:04:37.667: WARN/System.err(2177): at giat.hermes.network.IntelinkConnector.connect(IntelinkConnector.java:120)
05-10 13:04:37.667: WARN/System.err(2177): at giat.hermes.view.CreateAccount$ThreadLogMeIn.run(CreateAccount.java:77)
05-10 13:04:37.667: WARN/System.err(2177): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
05-10 13:04:37.667: WARN/System.err(2177): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)
05-10 13:04:37.674: WARN/System.err(2177): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)
05-10 13:04:37.674: WARN/System.err(2177): ... 11 more
05-10 13:04:37.674: WARN/System.err(2177): Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
05-10 13:04:37.698: WARN/System.err(2177): at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:225)
05-10 13:04:37.698: WARN/System.err(2177): at java.security.cert.CertPathValidator.validate(CertPathValidator.java:202)
05-10 13:04:37.698: WARN/System.err(2177): at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)
05-10 13:04:37.698: WARN/System.err(2177): ... 12 more
And I don't want to just accept all server certs
Also, if this is what's causing the problem, would it be enough to cover backwards compatibility? I'm not likely to run into this with future updates of Android right?

If you want/need your app to to work with 2.2 and lower, you need to include the CA certificate in your app and set up HttpClient to trust it. You don't need to (and shouldn't) accept all certificates. As for future updates, the certificate could be removed if it is compromised, but otherwise it's unlikely.
And yes, if you are accessing an HTTPS URL, data will be sent and received using SSL (encrypted). You can capture packets to verify.

Related

Google App Engine Connected Android Registration with Endpoints Server FAILED

I am trying to follow this guide to get an App Engine Connected Android Project working. However, when I try to run my Android application and register, the Registration with Google Cloud Messaging succeeds, but the Registration with Endpoints Server fails.
https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
I manually set the LOCAL_ANDROID_RUN = true in CloudEndpointUtils.java
Any ideas on how I can fix this issue? I have tried the suggestions in search results with no success.
Exception received when attempting to register with server at http://10.0.2.2:8888/_ah/api/
java.net.SocketTimeoutException: failed to connect to /10.0.2.2 (port 8888) after 20000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:159)
at libcore.io.IoBridge.connect(IoBridge.java:112)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)
at java.net.Socket.connect(Socket.java:832)
at libcore.net.http.HttpConnection.<init>(HttpConnection.java:76)
at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340)
at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:316)
at libcore.net.http.HttpEngine.connect(HttpEngine.java:311)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:964)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at com.finalproject.GCMIntentService.onRegistered(GCMIntentService.java:163)
at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:251)
at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:153)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:61)
My screen on my phone looks similar to this:

Http post request inside a GPS Listener...initiated by a Service

I'm doing an app in which a Service initiates a GPSListener which gets location updates in a regular interval of time.Upto this part its woking fine,and Im getting updates correctly.
I need to update this lat,long values to a server database,for which I use a http post request to a php script;which individually works fien.But when its called inside the LocationListener,Im getting the following error stacktrace.
How can I overcome this situation and make the post request?
> android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
at java.net.InetAddress.getAllByName(InetAddress.java:214)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
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)
at com.childtrack.service.SimpleService$mylocationlistener.postData(SimpleService.java:165)
at com.childtrack.service.SimpleService$mylocationlistener.onLocationChanged(SimpleService.java:101)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:237)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:170)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:186)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4899)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
W/System.err(5560): android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
at java.net.InetAddress.getAllByName(InetAddress.java:214)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
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)
at com.childtrack.service.SimpleService$mylocationlistener.postData(SimpleService.java:165)
at com.childtrack.service.SimpleService$mylocationlistener.onLocationChanged(SimpleService.java:101)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:237)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:170)
at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:186)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4899)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
you are doing network operation on main(UI) thread. do use asyntask for network operation.
android does not allow to perform network operation on main thread. because it may freezes the UI.
whenever this exception occur android.os.NetworkOnMainThreadException its mean you have done something network operation on UI.
Even though Service is intended for background processing they run in the main thread .
A short quote from the documentation:
Caution: A services runs in the same process as the application in which
it is declared and in the main thread of that application, by default. So,
if your service performs intensive or blocking operations while the user
interacts with an activity from the same application, the service will
slow down activity performance. To avoid impacting application performance,
you should start a new thread inside the service.

android app running in background with timer task,suddenly stop the task

I make app in android with scheduled task and running in background, but when i open other app and do it something with my device,then i back to my app to check the task,the task is stopped. i have logcat like this,does somebody now what i'm doing wrong??
05-10 17:55:14.520: W/GpsLocationProvider(149): Unneeded remove listener for uid 1000
05-10 17:55:14.650: W/ActivityManager(149): Scheduling restart of crashed service com.sec.chaton/.push.PushClientService in 5000ms
05-10 17:55:15.740: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.750: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.790: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.790: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:16.580: W/ActivityManager(149): Scheduling restart of crashed service com.staircase3.opensignal/.library.Background_scan in 5000ms
05-10 17:55:21.680: E/API(9280): 15
05-10 17:55:21.700: E/Background_scan(9280): Tab_Overview.overview_visible=false;
05-10 17:55:34.990: W/ActivityManager(149): startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=com.firstwap.celltrack/.MainActivity bnds=[834,488][1264,552] }
05-10 17:55:35.030: W/KeyguardViewMediator(149): verifyUnlock called when not externally disabled
05-10 17:55:35.140: W/ActivityManager(149): Force removing ActivityRecord{414b2478 com.firstwap.celltrack/.MainActivity}: app died, no saved state
05-10 17:55:35.250: W/GpsLocationProvider(149): Duplicate add listener for uid 10012
05-10 17:55:35.350: E/LWUIT(9312): problem with setHasAlpha
05-10 17:55:35.350: E/LWUIT(9312): java.lang.NoSuchMethodException: setHasAlpha [class java.lang.Boolean]
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.Class.getConstructorOrMethod(Class.java:460)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.Class.getMethod(Class.java:915)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidView.initBitmaps(AndroidView.java:151)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidView.<init>(AndroidView.java:132)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation$1.run(AndroidImplementation.java:244)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation$12.run(AndroidImplementation.java:2155)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Activity.runOnUiThread(Activity.java:4170)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.runOnAndroidUIThreadAndWait(AndroidImplementation.java:2151)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.runOnAndroidUIThreadAndWait(AndroidImplementation.java:2144)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.initSurface(AndroidImplementation.java:238)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.init(AndroidImplementation.java:179)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.Display.init(Display.java:423)
05-10 17:55:35.350: E/LWUIT(9312): at com.firstwap.celltrack.MobileCellTrackActivity.onCreate(MobileCellTrackActivity.java:173)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Activity.performCreate(Activity.java:4465)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-10 17:55:35.350: E/LWUIT(9312): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 17:55:35.350: E/LWUIT(9312): at android.os.Looper.loop(Looper.java:137)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 17:55:35.350: E/LWUIT(9312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 17:55:35.350: E/LWUIT(9312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 17:55:35.350: E/LWUIT(9312): at dalvik.system.NativeStart.main(Native Method)
05-10 17:55:44.440: W/InputManagerService(149): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#4164f0b0
05-10 17:55:47.510: W/InputManagerService(149): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#416f80f0 (uid=10012 pid=9312)
It's a crash issue (NoSuchMethodException).
Logs:
05-10 17:55:35.350: E/LWUIT(9312): problem with setHasAlpha
05-10 17:55:35.350: E/LWUIT(9312): java.lang.NoSuchMethodException: setHasAlpha [class java.lang.Boolean]

Unable to download an image in android

I need to download twitter profile picture of mine and show it in an imageview on click of a button. Here is my code to download the profile picture of desired user.
public static InputStream getTwitterProfilePictureOfUser(String twitterId){
try {
return new DefaultHttpClient().execute(new HttpGet("http://api.twitter.com/1/users/profile_image?user_id="+twitterId+"&size=bigger")).getEntity().getContent();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
Getting the following exceptions. Where i'am going wrong ?
javax.net.ssl.SSLException: Not trusted server certificate
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:174)
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:348)
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)
at com.tarams.android.giveblood.service.ServiceStub.getTwitterProfilePictureOfUser(ServiceStub.java:207)
at com.tarams.android.giveblood.activities.ProfileActivity.onCreate(ProfileActivity.java:128)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2633)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2685)
at android.app.ActivityThread.access$2300(ActivityThread.java:126)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2038)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4633)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)
... 24 more
Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:149)
at java.security.cert.CertPathValidator.validate(CertPathValidator.java:202)
at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)
You are attempting to connect to an HTTPS URL via and the SSL certificate provided by the site is not trusted by the devise you are running the code on. I suggest you read this question on setting up trust in the Apache HTTP Client

Not a trusted server certificate...Anybody take on this please

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(4057): 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

Categories

Resources