package de.martinreinhardt.cordova.plugins;


import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaWebViewClient;

import android.net.http.SslError;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;


/**
 *
 * Certificate Plugin for Cordova
 *
 * author, Martin Reinhardt on 26.05.14.
 *
 */
public class CertificatesCordovaWebViewClient extends CordovaWebViewClient {

    private boolean allowUntrusted = false;

    public CertificatesCordovaWebViewClient(CordovaInterface cordova) {
        super(cordova);
    }

    public void setAllowUntrusted(final boolean pAllowUntrusted) {
        this.allowUntrusted = pAllowUntrusted;
    }

    public boolean isAllowUntrusted() {
       return allowUntrusted;
    }

    @Override
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
        Log.d("onReceivedSslError. Proceed? " + isAllowUntrusted());
        if (isAllowUntrusted()) {
            handler.proceed();
        } else {
            handler.cancel();
        }
    }
}
@@ -39,16 +39,60 @@
 gins;%0A%0A%0A
+import org.apache.cordova.CordovaInterface;%0A
 import o
@@ -125,16 +125,16 @@
 ebView;%0A
-
 import o
@@ -174,16 +174,41 @@
 lient;%0A%0A
+import android.util.Log;%0A
 import a
@@ -475,16 +475,90 @@
 ient %7B%0A%0A
+    public static final String TAG = %22CertificatesCordovaWebViewClient%22;%0A%0A
     priv
@@ -997,24 +997,24 @@
 or error) %7B%0A
-
         Log.
@@ -1015,16 +1015,21 @@
   Log.d(
+TAG, 
 %22onRecei

Fix class import error