Exemplo n.º 1
0
  @Override
  public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    if (RhoConf.getBool("no_ssl_verify_peer")) {
      Logger.D(TAG, "Skip SSL error.");
      handler.proceed();
    } else {
      StringBuilder msg = new StringBuilder();
      msg.append("SSL error - ");
      switch (error.getPrimaryError()) {
        case SslError.SSL_NOTYETVALID:
          msg.append("The certificate is not yet valid: ");
          break;
        case SslError.SSL_EXPIRED:
          msg.append("The certificate has expired: ");
          break;
        case SslError.SSL_IDMISMATCH:
          msg.append("Hostname mismatch: ");
          break;
        case SslError.SSL_UNTRUSTED:
          msg.append("The certificate authority is not trusted: ");
          break;
      }
      msg.append(error.getCertificate().toString());
      Logger.W(TAG, msg.toString());
      handler.cancel();
    }
  }
 public void onReceivedSslError(WebView webview, SslErrorHandler sslerrorhandler, SslError sslerror)
 {
     super.onReceivedSslError(webview, sslerrorhandler, sslerror);
     webview = AdTrackerNetworkInterface.c();
     if (webview.hasMessages(9))
     {
         webview.removeMessages(9);
         Log.internal("[InMobi]-[AdTracker]-4.5.3", "Webview Received SSL Error");
         sslerrorhandler = Message.obtain();
         sslerrorhandler.what = 10;
         sslerrorhandler.arg2 = sslerror.getPrimaryError();
         sslerrorhandler.obj = AdTrackerWebViewLoader.c(a);
         webview.sendMessage(sslerrorhandler);
     }
 }
 @Override
 public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
   // Ignore SSL certificate errors for PNA, can't use my client cert :(
   if (view.getUrl() == null
       || view.getUrl().equals("https://management.pna.utexas.edu/server/graph.cgi")) {
     handler.proceed();
   } else {
     super.onReceivedSslError(view, handler, error);
   }
 }
 @TargetApi(8)
 public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError)
 {
   String str = this.cordova.getActivity().getPackageName();
   PackageManager localPackageManager = this.cordova.getActivity().getPackageManager();
   try
   {
     if ((0x2 & localPackageManager.getApplicationInfo(str, 128).flags) != 0)
     {
       paramSslErrorHandler.proceed();
       return;
     }
     super.onReceivedSslError(paramWebView, paramSslErrorHandler, paramSslError);
     return;
   }
   catch (PackageManager.NameNotFoundException localNameNotFoundException)
   {
     super.onReceivedSslError(paramWebView, paramSslErrorHandler, paramSslError);
   }
 }
Exemplo n.º 5
0
  public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = this.ctx.getApplicationContext().getPackageName();
    final PackageManager pm = this.ctx.getApplicationContext().getPackageManager();
    ApplicationInfo appInfo;
    try {
      appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
      if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
        // debug = true
        handler.proceed();
        return;
      } else {
        // debug = false
        super.onReceivedSslError(view, handler, error);
      }
    } catch (NameNotFoundException e) {
      // When it doubt, lock it out!
      super.onReceivedSslError(view, handler, error);
    }
  }
Exemplo n.º 6
0
  @Override
  public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    handler.proceed();
  }