HTTPClient validatesSecureCertificate not working on Android 2.1?
When running on the device in release mode, the validatesSecureCertificate seems to be ignored. I am setting the value to false like so:
httpClient.validatesSecureCertificate = false;
However when building for release it seems to be ignored and I always get the error message "Not trusted server certificate." I have tried this on SDK 1.6.2 and 1.7.0 beta SDK.
I don't have control over the server cert, so that is not an option for me unfortunately.
Thanks
1 Answer
-
There is a bug with the SDK, I saw it in a ticket that is causing this issue (I forget which ticket).
One workaround that has worked for some is to simply define the validatesSecureCertificate value when you create the httpClient rather than tacking it on later as you have been doing.
var xhr = Ti.Network.createHTTPClient({ validatesSecureCertificate: false, timeout: 120000 });