aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/runtime
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2011-09-22 17:41:51 +0200
committerJiri Vanek <[email protected]>2011-09-22 17:41:51 +0200
commitd791f8ea414740894cc21b3ddc7925c6c323e821 (patch)
tree715a39ee9439c4f0a82ec6289524513811c3b92b /netx/net/sourceforge/jnlp/runtime
parent451529c4953d24e031f747fe1dee6cd8b1bb7574 (diff)
added XrustAll option
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime')
-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
3 files changed, 18 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;
+ }
+
}