Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

WebView SSL Error Android

$
0
0

Hey guys,

I got a big problem of accessing a SSL page in a WebView on Android. I got default code like this:

var webView = Ti.UI.createWebView({
    top : 0,
    bottom : 0,
    scalesPageToFit : true,
    right : 0,
    left : 0,
});
if (isAndroid) {
    webView.ignoreSslError = true;
    webView.overScrollMode = Titanium.UI.Android.OVER_SCROLL_IF_CONTENT_SCROLLS;
    webView.pluginState = Titanium.UI.Android.WEBVIEW_PLUGINS_ON;
}
While some connections in the App also are handled by a HTTPConnection, I tried to ignore SSL there, too:
var httpClient = Titanium.Network.createHTTPClient();
    httpClient.validatesSecureCertificate = false;
The Webpage (which is accessed via the internet) loads various files for it's display, like fonts, css, etc. Per file I get the following LogCat output:
Tag: TiWVC
Message: (main) [2,42999] SSL error occurred: primary error: 3 certificate: Issued to: xxx
xxx would be our Server (which got a valid certificate).

The WebView displays perfectly fine on IOS, but only shows "empty" in Android (and the logs are shown).

I either need to "accept" this certificate or need to ignore those Errors. The Error "3" I get is SSL_UNTRUSTED.

How can I "trust" our page or disable that check? I already searched this Q&A and further more pages but I did not find anything which worked.

Thank you in advance


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>