aboutsummaryrefslogtreecommitdiffstats
path: root/netx
diff options
context:
space:
mode:
Diffstat (limited to 'netx')
-rw-r--r--netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java9
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java3
-rw-r--r--netx/net/sourceforge/jnlp/security/KeyStores.java15
3 files changed, 25 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java b/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
index 24abb06..17b811e 100644
--- a/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
+++ b/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
@@ -53,6 +53,7 @@ import javax.swing.event.ListSelectionListener;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.security.KeyStores;
import net.sourceforge.jnlp.security.viewer.CertificatePane;
/**
@@ -354,6 +355,14 @@ public class ControlPanel extends JFrame {
e.printStackTrace();
}
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (Exception e) {
+ // ignore; not a big deal
+ }
+
+ KeyStores.setConfiguration(config);
+
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
index 393b3cb..61417a4 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
@@ -37,6 +37,7 @@ import net.sourceforge.jnlp.*;
import net.sourceforge.jnlp.cache.*;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.security.JNLPAuthenticator;
+import net.sourceforge.jnlp.security.KeyStores;
import net.sourceforge.jnlp.security.SecurityDialogMessageHandler;
import net.sourceforge.jnlp.security.VariableX509TrustManager;
import net.sourceforge.jnlp.services.*;
@@ -160,6 +161,8 @@ public class JNLPRuntime {
}
}
+ KeyStores.setConfiguration(config);
+
initializeStreams();
isWebstartApplication = isApplication;
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);
}
/**