aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2010-11-08 16:36:17 -0500
committerOmair Majid <[email protected]>2010-11-08 16:36:17 -0500
commitfe0ca6144db1e34521813d103fe6d65954ebe10c (patch)
treec44be19763c573bce8c310c5e77a523c59333c38 /netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
parent66292226de4b8120307cf4a5fd283260963e0e6f (diff)
integrate multiple keystore support into certificate viewer
2010-11-04 Omair Majid <[email protected]> * netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java: Add KEY_USER_TRUSTED_CA_CERTS, KEY_USER_TRUSTED_JSSE_CA_CERTS, KEY_USER_TRUSTED_CERTS, KEY_USER_TRUSTED_JSSE_CERTS, KEY_USER_TRUSTED_CLIENT_CERTS, KEY_SYSTEM_TRUSTED_CA_CERTS, KEY_SYSTEM_TRUSTED_JSSE_CA_CERTS, KEY_SYSTEM_TRUSTED_CERTS, KEY_SYSTEM_TRUSTED_JSSE_CERTS, KEY_SYSTEM_TRUSTED_CLIENT_CERTS (loadDefaultProperties): Use the defined constants. * netx/net/sourceforge/jnlp/security/KeyStores.java: New class. (getPassword): New method. Return the default password used for KeyStores. (getKeyStore(Level,Type)): New method. Returns the appropriate KeyStore. (getKeyStore(Level,Type,String)): Likewise. (getCertKeyStores): New method. Return all the trusted certificate KeyStores. (getCAKeyStores): New method. Return all the trusted CA certificate KeyStores. (getKeyStoreLocation): New method. Return the location of the appropriate KeyStore. (toTranslatableString): New method. Return a string that can be used to create a human-readable name for the KeyStore. (toDisplayableString): New method. Return a human-readable name for the KeyStore. (createKeyStoreFromFile): New method. Creates a new KeyStore object, initializing it from the given file if possible. * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java (CertificatePane): Create two JTables. Populate the tables when done creating the user interface. (initializeKeyStore): Use the correct keystore. (addComponents): Do not read KeyStore. Create more interface elements to show the new possible KeyStores. Mark some buttons to be disabled when needed. (repopulateTable): Renamed to... (repopulateTables): New method. Read KeyStore and use the contents to create the user and system tables. (CertificateType): New class. (CertificateTypeListener): New class. Listens to JComboBox change events. (TabChangeListener): New class. Listens to new tab selections. (ImportButtonListener): Import certificates to the appropriate KeyStore. (ExportButtonListener): Find the certificate from the right table. (RemoveButtonListener): Find the certificate from the right table and right the KeyStore. (DetailsButtonListener): Find the certificate from the right table. * netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java (showCertficaiteViewer): Initialize the JNLPRuntime so the configuration gets loaded. * netx/net/sourceforge/jnlp/tools/KeyTool.java (addToKeyStore(File,KeyStore)): New method. Adds certificate from the file to the KeyStore. (addToKeyStore(X509Certificate,KeyStore)): New method. Adds a certificate to a KeyStore.
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java b/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
index 403472c..c7135f1 100644
--- a/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
+++ b/netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java
@@ -48,6 +48,8 @@ import java.awt.event.WindowEvent;
import javax.swing.JDialog;
import javax.swing.UIManager;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
public class CertificateViewer extends JDialog {
private boolean initialized = false;
@@ -97,6 +99,7 @@ public class CertificateViewer extends JDialog {
public static void showCertificateViewer() throws Exception {
+ JNLPRuntime.initialize(true);
setSystemLookAndFeel();
CertificateViewer cv = new CertificateViewer();