I'm trying for connecting to some local HTTPS server while using apache DefaultHttpClient on the Android device.
DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://192.168.1.121:4113/services"); ... header and content filling in ... HttpResponse response = httpclient.execute(httppost);
I get a mistake of "javax.internet.ssl SSLException: Not reliable server certificate" once the .execute runs. I wish to simply allow any certificate to operate, no matter if it's or perhaps is not within the android keychain.
I've spent about 40 hrs researching and trying to puzzle out a workaround with this problem. I've come across many good examples of methods to get this done but none of them to date have labored in Android they appear to simply work with JAVA. Does anybody understand how to configure, or override the certificate validation utilized by the Apache HttpClient in Android to ensure that it'll just approve all certificates for any DefaultHttpClient connection?
I appreciate your kind response
If anybody continues to be attempting to figure this out I wound up choosing the answer here:
Scroll lower towards the solution by SimonJ. It's a simple easy fix for your problem.
The tutorial is dependant on Apache's HttpClient and describes ways to use the SSLSocketFactory to trust the defined certificates in your keystore (also described the best way to create it using the BouncyCastle provider).
I have examined it and delay pills work great. For me this is actually the secure way.