aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/security')
-rw-r--r--netx/net/sourceforge/jnlp/security/KeyStores.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/security/KeyStores.java b/netx/net/sourceforge/jnlp/security/KeyStores.java
index e7a83d5..12da0c8 100644
--- a/netx/net/sourceforge/jnlp/security/KeyStores.java
+++ b/netx/net/sourceforge/jnlp/security/KeyStores.java
@@ -51,7 +51,6 @@ import java.util.List;
import java.util.StringTokenizer;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.runtime.Translator;
import net.sourceforge.jnlp.util.FileUtils;
@@ -76,6 +75,8 @@ public final class KeyStores {
CLIENT_CERTS,
}
+ private static DeploymentConfiguration config = null;
+
private static final String KEYSTORE_TYPE = "JKS";
/** the default password used to protect the KeyStores */
private static final String DEFAULT_PASSWORD = "changeit";
@@ -84,6 +85,16 @@ public final class KeyStores {
return DEFAULT_PASSWORD.toCharArray();
}
+ /** Set the configuration object to use for getting KeyStore paths */
+ public static void setConfiguration(DeploymentConfiguration newConfig) {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new AllPermission());
+ }
+
+ config = newConfig;
+ }
+
/**
* Returns a KeyStore corresponding to the appropriate level level (user or
* system) and type.
@@ -272,7 +283,7 @@ public final class KeyStores {
throw new RuntimeException("Unspported");
}
- return JNLPRuntime.getConfiguration().getProperty(configKey);
+ return config.getProperty(configKey);
}
/**