aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/Boot.java3
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java3
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java12
-rw-r--r--netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java4
4 files changed, 22 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/Boot.java b/netx/net/sourceforge/jnlp/runtime/Boot.java
index cb077fb..b35b338 100644
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java
@@ -156,6 +156,9 @@ public final class Boot implements PrivilegedAction<Void> {
if (null != getOption("-Xnofork")) {
JNLPRuntime.setForksAllowed(false);
}
+ if (null != getOption("-Xtrustall")) {
+ JNLPRuntime.setTrustAll(true);
+ }
JNLPRuntime.setInitialArgments(Arrays.asList(argsIn));
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index 9b93a2d..09f05cf 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -755,6 +755,9 @@ public class JNLPClassLoader extends URLClassLoader {
}
private void checkTrustWithUser(JarSigner js) throws LaunchException {
+ if (JNLPRuntime.isTrustAll()){
+ return;
+ }
if (!js.getRootInCacerts()) { //root cert is not in cacerts
boolean b = SecurityDialogs.showCertWarningDialog(
AccessType.UNVERIFIED, file, js);
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
index 9db9466..32fb348 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
@@ -123,6 +123,9 @@ public class JNLPRuntime {
/** set to false to indicate another JVM should not be spawned, even if necessary */
private static boolean forksAllowed = true;
+ /** all security dialogs will be consumed and pretented as beeing verified by user and allowed.*/
+ private static boolean trustAll=false;
+
/** contains the arguments passed to the jnlp runtime */
private static List<String> initialArguments;
@@ -132,6 +135,7 @@ public class JNLPRuntime {
public static final String STDERR_FILE = "java.stderr";
public static final String STDOUT_FILE = "java.stdout";
+
/**
* Returns whether the JNLP runtime environment has been
* initialized. Once initialized, some properties such as the
@@ -732,4 +736,12 @@ public class JNLPRuntime {
}
}
+ static void setTrustAll(boolean b) {
+ trustAll=b;
+ }
+
+ public static boolean isTrustAll() {
+ return trustAll;
+ }
+
}
diff --git a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
index 5eb790d..b6f1377 100644
--- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
+++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
@@ -53,6 +53,7 @@ import sun.security.util.HostnameChecker;
import sun.security.validator.ValidatorException;
import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
@@ -382,6 +383,9 @@ final public class VariableX509TrustManager extends X509ExtendedTrustManager {
private boolean askUser(X509Certificate[] chain, String authType,
boolean isTrusted, boolean hostMatched,
String hostName) {
+ if (JNLPRuntime.isTrustAll()){
+ return true;
+ }
return SecurityDialogs.showCertWarningDialog(
AccessType.UNVERIFIED, null,
new HttpsCertVerifier(this, chain, authType,