Add switch for developer mode (TR-03124-1)
@@ -44,6 +44,12 @@ public class TR03112Utils {
private static final String SHA256 = "SHA-256";
+ /**
+ * This switch enables the developer mode described in TR-03124-1.
+ * When enabled the Communication Certificate checks do not fail but issue a warning instead.
+ */
+ public static boolean DEVELOPER_MODE = false;
+
/**
* Check if the two given URLs comply the Same-Origin-Policy.
*
@@ -123,8 +129,14 @@ public class TR03112Utils {
LOG.error("Server certificate couldn't be encoded.");
return false;
}
+
+ if (DEVELOPER_MODE) {
+ LOG.warn("DEVELOPER_MODE: No matching communication certificate found, continuing nevertheless.");
+ return true;
+ } else {
return false;
}
+ }
/**
* Check if the given status code indicates a redirect (301, 302, 303, 307).
