I´m having issues consuming a REST service in a server which has a self signed certificate, I’m using the pluggin https://github.com/wymsee/cordova-HTTP.git and after copying the certificate in the app as the plugin indicates but then I get null response . In chrome if I test the service with the Advance Rest Client App, I need to accept previously in another tab the security warning because the self signed certificate and then I can call the service, Something like that is what I need to do but in my Ionic app. Any ideas?
@herve76 Hmm… I’m no security expert, but it seems to me like someone could hijack your app’s connection and route the traffic to a compromised server with an invalid cert. The code change above tells the app that it’s OK to proceed with the connection if the server’s certificate is invalid for any reason. If you’re OK connecting to servers with cert problems, then you should be fine…but then why use SSL in the first place?
We need top security on the connection to protect the user’s data, so we can only use this hack in testing. It isn’t a problem for us in production, since our servers have valid certs.
I guess it comes down to your comfort level with the potential security hole & the sensitivity of your data. My two cents!
@franclopez It looks like the Android platform changed and this may have moved to project/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java, but I’m having trouble with it…
Have you had to make any other changes beyond what’s in this thread?
The best way to get around this issue is to use SSL pinning. I have used the Intel App Security API plugin for the same. Their documentation explains the entire process. Hope this helps.