From commits-return-58816-archive-asf-public=cust-asf.ponee.io@cordova.apache.org Sun Oct 14 23:08:35 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DDDAB180674 for ; Sun, 14 Oct 2018 23:08:34 +0200 (CEST) Received: (qmail 75331 invoked by uid 500); 14 Oct 2018 21:08:34 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 75322 invoked by uid 99); 14 Oct 2018 21:08:34 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2018 21:08:34 +0000 From: GitBox To: commits@cordova.apache.org Subject: [GitHub] Vaporexpress edited a comment on issue #292: SSL errors handling in Android Message-ID: <153955131347.26146.4277408869357933227.gitbox@gitbox.apache.org> Date: Sun, 14 Oct 2018 21:08:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Vaporexpress edited a comment on issue #292: SSL errors handling in Android URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/292#issuecomment-429660652 Hi. FYI Google rejected my App until I added this code: On "**public class InAppBrowserClient extends WebViewClient**": ``` // Rejected by Google Play - Failed to validate the certificate chain @Override public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) { final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(webView.getContext(), R.style.AlertDialogCustom)); String message = "SSL Certificate error."; switch (error.getPrimaryError()) { case SslError.SSL_NOTYETVALID: message = "The certificate is not yet valid."; break; case SslError.SSL_EXPIRED: message = "The certificate has expired."; break; case SslError.SSL_IDMISMATCH: message = "Hostname mismatch."; break; case SslError.SSL_UNTRUSTED: message = "The certificate authority is not trusted."; break; case SslError.SSL_DATE_INVALID: message = "The date of the certificate is invalid."; break; case SslError.SSL_INVALID: message = "A generic error occurred."; break; case SslError.SSL_MAX_ERROR: /* Deprecated in API level 14*/ message = "The number of different SSL errors."; break; } message += " Do you want to continue anyway?"; builder.setTitle("SSL Certificate Error"); builder.setMessage(message); builder.setPositiveButton("continuar", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { handler.proceed(); } }); builder.setNegativeButton("cancelar", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { handler.cancel(); closeDialog(); } }); final AlertDialog dialog = builder.create(); dialog.show(); } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org