Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B824B10EC6 for ; Wed, 30 Oct 2013 19:46:15 +0000 (UTC) Received: (qmail 94049 invoked by uid 500); 30 Oct 2013 19:46:05 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 94001 invoked by uid 500); 30 Oct 2013 19:46:02 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 93919 invoked by uid 99); 30 Oct 2013 19:45:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 19:45:59 +0000 Date: Wed, 30 Oct 2013 19:45:59 +0000 (UTC) From: "Joe Bowser (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-3576) Add support for self-signed SSL certficates in InAppBrowser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-3576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Bowser updated CB-3576: --------------------------- Assignee: (was: Andrew Grieve) > Add support for self-signed SSL certficates in InAppBrowser > ----------------------------------------------------------- > > Key: CB-3576 > URL: https://issues.apache.org/jira/browse/CB-3576 > Project: Apache Cordova > Issue Type: Improvement > Components: Android, iOS, Plugin InAppBrowser > Affects Versions: 2.7.0, 2.8.0 > Environment: Android and iOS > Reporter: Montyleena > Priority: Minor > Labels: android, https, inappbrowser,, ios, ssl > Attachments: InAppBrowser.java > > > Local https links are blocked by default in InAppBrowser (links using a local SSL certificate which can't be verified by a 3rd party). Ideally, user should be given an option to proceed or cancel the request like the default desktop/mobile browsers do. > Right now, we have to overwrite the following API in Android to access such URLs but onReceivedSslError() function gets called only for the main PhoneGap window browser and not for InAppBrowser. > Create a new class: > public class CustomWebViewClient extends CordovaWebViewClient { > > public static final String LOG_TAG = "Plugin"; > > public CustomWebViewClient(DroidGap ctx) { > super(ctx); > Log.d(LOG_TAG, "Constructor!"); > } > @Override > public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { > handler.proceed(); > } > } > In the main class, we use our custom class as a web view client > CordovaWebViewClient webViewClient = new CustomWebViewClient(this); > webViewClient.setWebView(this.appView); > this.appView.setWebViewClient(webViewClient); > And similar type of code needs to be written for iOS. > InAppBrowser should pick up the SSL settings from the main web view and once we overwrite the onReceivedSslError() function, then it should allow such URLs in the InAppBrowser too. -- This message was sent by Atlassian JIRA (v6.1#6144)