diff options
author | Omair Majid <[email protected]> | 2010-11-08 16:36:17 -0500 |
---|---|---|
committer | Omair Majid <[email protected]> | 2010-11-08 16:36:17 -0500 |
commit | fe0ca6144db1e34521813d103fe6d65954ebe10c (patch) | |
tree | c44be19763c573bce8c310c5e77a523c59333c38 /netx/net/sourceforge/jnlp/runtime | |
parent | 66292226de4b8120307cf4a5fd283260963e0e6f (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/runtime')
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java b/netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java index 2ad3619..f2217ee 100644 --- a/netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java +++ b/netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java @@ -142,6 +142,18 @@ public final class DeploymentConfiguration { */ public static final String KEY_USER_NETX_RUNNING_FILE = "deployment.user.runningfile"; + public static final String KEY_USER_TRUSTED_CA_CERTS = "deployment.user.security.trusted.cacerts"; + public static final String KEY_USER_TRUSTED_JSSE_CA_CERTS = "deployment.user.security.trusted.jssecacerts"; + public static final String KEY_USER_TRUSTED_CERTS = "deployment.user.security.trusted.certs"; + public static final String KEY_USER_TRUSTED_JSSE_CERTS = "deployment.user.security.trusted.jssecerts"; + public static final String KEY_USER_TRUSTED_CLIENT_CERTS = "deployment.user.security.trusted.clientauthcerts"; + + public static final String KEY_SYSTEM_TRUSTED_CA_CERTS = "deployment.system.security.cacerts"; + public static final String KEY_SYSTEM_TRUSTED_JSSE_CA_CERTS = "deployment.system.security.jssecacerts"; + public static final String KEY_SYSTEM_TRUSTED_CERTS = "deployment.system.security.trusted.certs"; + public static final String KEY_SYSTEM_TRUSTED_JSSE_CERTS = "deployment.system.security.trusted.jssecerts"; + public static final String KEY_SYSTEM_TRUSTED_CLIENT_CERTS = "deployment.system.security.trusted.clientautcerts"; + public enum ConfigType { System, User } @@ -315,17 +327,17 @@ public final class DeploymentConfiguration { { KEY_USER_NETX_RUNNING_FILE, LOCKS_DIR + File.separator + "netx_running" }, /* certificates and policy files */ { "deployment.user.security.policy", "file://" + USER_SECURITY + File.separator + "java.policy" }, - { "deployment.user.security.trusted.cacerts", USER_SECURITY + File.separator + "trusted.cacerts" }, - { "deployment.user.security.trusted.jssecacerts", USER_SECURITY + File.separator + "trusted.jssecacerts" }, - { "deployment.user.security.trusted.certs", USER_SECURITY + File.separator + "trusted.certs" }, - { "deployment.user.security.trusted.jssecerts", USER_SECURITY + File.separator + "trusted.jssecerts"}, - { "deployment.user.security.trusted.clientauthcerts", USER_SECURITY + File.separator + "trusted.clientcerts" }, + { KEY_USER_TRUSTED_CA_CERTS, USER_SECURITY + File.separator + "trusted.cacerts" }, + { KEY_USER_TRUSTED_JSSE_CA_CERTS, USER_SECURITY + File.separator + "trusted.jssecacerts" }, + { KEY_USER_TRUSTED_CERTS, USER_SECURITY + File.separator + "trusted.certs" }, + { KEY_USER_TRUSTED_JSSE_CERTS, USER_SECURITY + File.separator + "trusted.jssecerts"}, + { KEY_USER_TRUSTED_CLIENT_CERTS, USER_SECURITY + File.separator + "trusted.clientcerts" }, { "deployment.system.security.policy", null }, - { "deployment.system.security.cacerts", SYSTEM_SECURITY + File.separator + "cacerts" }, - { "deployment.system.security.jssecacerts", SYSTEM_SECURITY + File.separator + "jssecacerts" }, - { "deployment.system.security.trusted.certs", SYSTEM_SECURITY + File.separator + "trusted.certs" }, - { "deployment.system.security.trusted.jssecerts", SYSTEM_SECURITY + File.separator + "trusted.jssecerts" }, - { "deployment.system.security.trusted.clientautcerts", SYSTEM_SECURITY + File.separator + "trusted.clientcerts" }, + { KEY_SYSTEM_TRUSTED_CA_CERTS , SYSTEM_SECURITY + File.separator + "cacerts" }, + { KEY_SYSTEM_TRUSTED_JSSE_CA_CERTS, SYSTEM_SECURITY + File.separator + "jssecacerts" }, + { KEY_SYSTEM_TRUSTED_CERTS, SYSTEM_SECURITY + File.separator + "trusted.certs" }, + { KEY_SYSTEM_TRUSTED_JSSE_CERTS, SYSTEM_SECURITY + File.separator + "trusted.jssecerts" }, + { KEY_SYSTEM_TRUSTED_CLIENT_CERTS, SYSTEM_SECURITY + File.separator + "trusted.clientcerts" }, /* security access and control */ { "deployment.security.askgrantdialog.show", String.valueOf(true) }, { "deployment.security.askgrantdialog.notinca", String.valueOf(true) }, |