Untrusted server certificate error with webview.
Hi, I'm building an internal iPad app for a company intranet that needs to show webpages over https from a server that has a self-signed certificate.
I'm using a standard webview (Ti.UI.createWebView()) and get the following error:
[ERROR] Error loading: app://com.pinnacol.dwq/(null), Error: Error Domain=NSURLErrorDomain Code=-1202 UserInfo=0xd2044f0 "untrusted server certificate"
I know that view Objective-C there is a way to accept self-signed certificates. Is there a property or other mean that can be used on the Titanium.UI.WebView?
4 Answers
-
Heres a solution, modify the SDK files.
http://developer.appcelerator.com/question/120117/webview-ssl-certificate-error—no-way-to-accept-expired-server-certificate—ipad-app.html#answer-213681
-
Yea i'm looking for an answer similar to this question too
-
I know this is a hack, but the way I just solved this problem was to open the files using the HTTPClient and save them to a temp directory, when completed… I render the file in a WebView.
Still looking to see if I can load the response data directly into the webview for better performance
also include this
http://developer.appcelerator.com/question/50741/https-based-webservices
-
You should be able to simply set the validatesSecureCertificate property to false. That connection should then ignore any certificate errors.