aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2011-02-28 13:40:12 -0500
committerOmair Majid <[email protected]>2011-02-28 13:40:12 -0500
commit05dd25bd43df11fc874d857ced49bbe3c6e72a74 (patch)
treed8c54c16a4769b0861741e5960c694490d150526
parent07456720398f6e19a68e500493f731ae46a8303a (diff)
Rename security warning classes to security dialog classes.
Some of the security dialogs that are shown are not warning dialogs. 2011-02-28 Omair Majid <[email protected]> Rename files * netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java: Rename to ... * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java: New file. * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Rename to... * netx/net/sourceforge/jnlp/security/SecurityDialog.java: New file. * netx/net/sourceforge/jnlp/security/SecurityWarning.java: Rename to... * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: New file. * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java, * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, * netx/net/sourceforge/jnlp/security/AccessWarningPane.java, * netx/net/sourceforge/jnlp/security/AppletWarningPane.java, * netx/net/sourceforge/jnlp/security/CertWarningPane.java, * netx/net/sourceforge/jnlp/security/CertsInfoPane.java, * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java, * netx/net/sourceforge/jnlp/security/MoreInfoPane.java, * netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java, * netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java, * netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java, * netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java, * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java, * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java, * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java, * netx/net/sourceforge/jnlp/services/ServiceUtil.java, * netx/net/sourceforge/jnlp/services/XClipboardService.java, * netx/net/sourceforge/jnlp/services/XExtendedService.java, * netx/net/sourceforge/jnlp/services/XFileOpenService.java, * netx/net/sourceforge/jnlp/services/XFileSaveService.java: Update class names to the new classes.
-rw-r--r--ChangeLog35
-rw-r--r--netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java8
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java14
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/AccessWarningPane.java8
-rw-r--r--netx/net/sourceforge/jnlp/security/AppletWarningPane.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/CertWarningPane.java8
-rw-r--r--netx/net/sourceforge/jnlp/security/CertsInfoPane.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/MoreInfoPane.java4
-rw-r--r--netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java (renamed from netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java)16
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialog.java (renamed from netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java)66
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java4
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java6
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java14
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialogs.java (renamed from netx/net/sourceforge/jnlp/security/SecurityWarning.java)6
-rw-r--r--netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java2
-rw-r--r--netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java4
-rw-r--r--netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java4
-rw-r--r--netx/net/sourceforge/jnlp/services/ServiceUtil.java6
-rw-r--r--netx/net/sourceforge/jnlp/services/XClipboardService.java2
-rw-r--r--netx/net/sourceforge/jnlp/services/XExtendedService.java2
-rw-r--r--netx/net/sourceforge/jnlp/services/XFileOpenService.java2
-rw-r--r--netx/net/sourceforge/jnlp/services/XFileSaveService.java2
25 files changed, 129 insertions, 94 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a4a716..af078f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2011-02-28 Omair Majid <[email protected]>
+
+ Rename files
+ * netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java:
+ Rename to ...
+ * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java: New
+ file.
+ * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Rename
+ to...
+ * netx/net/sourceforge/jnlp/security/SecurityDialog.java: New file.
+ * netx/net/sourceforge/jnlp/security/SecurityWarning.java: Rename to...
+ * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: New file.
+ * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java,
+ * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java,
+ * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java,
+ * netx/net/sourceforge/jnlp/security/AccessWarningPane.java,
+ * netx/net/sourceforge/jnlp/security/AppletWarningPane.java,
+ * netx/net/sourceforge/jnlp/security/CertWarningPane.java,
+ * netx/net/sourceforge/jnlp/security/CertsInfoPane.java,
+ * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java,
+ * netx/net/sourceforge/jnlp/security/MoreInfoPane.java,
+ * netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java,
+ * netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java,
+ * netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java,
+ * netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java,
+ * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java,
+ * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java,
+ * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java,
+ * netx/net/sourceforge/jnlp/services/ServiceUtil.java,
+ * netx/net/sourceforge/jnlp/services/XClipboardService.java,
+ * netx/net/sourceforge/jnlp/services/XExtendedService.java,
+ * netx/net/sourceforge/jnlp/services/XFileOpenService.java,
+ * netx/net/sourceforge/jnlp/services/XFileSaveService.java: Update class
+ names to the new classes.
+
2011-02-25 Omair Majid <[email protected]>
* Makefile.am (stamps/netx-dist.stamp): Do not add extra files to
diff --git a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java
index 842385c..320228a 100644
--- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java
+++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java
@@ -35,8 +35,8 @@ import net.sourceforge.jnlp.ShortcutDesc;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.event.ApplicationEvent;
import net.sourceforge.jnlp.event.ApplicationListener;
-import net.sourceforge.jnlp.security.SecurityWarning;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.util.WeakList;
import net.sourceforge.jnlp.util.XDesktopEntry;
@@ -184,12 +184,12 @@ public class ApplicationInstance {
} else if (currentSetting.equals(ShortcutDesc.CREATE_ALWAYS)) {
createShortcut = true;
} else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER)) {
- if (SecurityWarning.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) {
+ if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) {
createShortcut = true;
}
} else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER_IF_HINTED)) {
if (sd != null && sd.onDesktop()) {
- if (SecurityWarning.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) {
+ if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) {
createShortcut = true;
}
}
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index da3c4c3..841e874 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -58,8 +58,8 @@ import net.sourceforge.jnlp.Version;
import net.sourceforge.jnlp.cache.CacheUtil;
import net.sourceforge.jnlp.cache.ResourceTracker;
import net.sourceforge.jnlp.cache.UpdatePolicy;
-import net.sourceforge.jnlp.security.SecurityWarning;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.tools.JarSigner;
import net.sourceforge.jnlp.util.FileUtils;
import sun.misc.JarIndex;
@@ -289,7 +289,7 @@ public class JNLPClassLoader extends URLClassLoader {
if (extLoader != null && extLoader != loader) {
if (loader.signing && !extLoader.signing)
- if (!SecurityWarning.showNotAllSignedWarningDialog(file))
+ if (!SecurityDialogs.showNotAllSignedWarningDialog(file))
throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
loader.merge(extLoader);
@@ -436,7 +436,7 @@ public class JNLPClassLoader extends URLClassLoader {
signing = true;
if (!js.allJarsSigned() &&
- !SecurityWarning.showNotAllSignedWarningDialog(file))
+ !SecurityDialogs.showNotAllSignedWarningDialog(file))
throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
//user does not trust this publisher
@@ -503,7 +503,7 @@ public class JNLPClassLoader extends URLClassLoader {
private void checkTrustWithUser(JarSigner js) throws LaunchException {
if (!js.getRootInCacerts()) { //root cert is not in cacerts
- boolean b = SecurityWarning.showCertWarningDialog(
+ boolean b = SecurityDialogs.showCertWarningDialog(
AccessType.UNVERIFIED, file, js);
if (!b)
throw new LaunchException(null, null, R("LSFatal"),
@@ -511,10 +511,10 @@ public class JNLPClassLoader extends URLClassLoader {
} else if (js.getRootInCacerts()) { //root cert is in cacerts
boolean b = false;
if (js.noSigningIssues())
- b = SecurityWarning.showCertWarningDialog(
+ b = SecurityDialogs.showCertWarningDialog(
AccessType.VERIFIED, file, js);
else if (!js.noSigningIssues())
- b = SecurityWarning.showCertWarningDialog(
+ b = SecurityDialogs.showCertWarningDialog(
AccessType.SIGNING_ERROR, file, js);
if (!b)
throw new LaunchException(null, null, R("LSFatal"),
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
index b5b23ca..fca019e 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
@@ -30,7 +30,7 @@ import java.security.SecurityPermission;
import javax.swing.JWindow;
import net.sourceforge.jnlp.JNLPFile;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.services.ServiceUtil;
import net.sourceforge.jnlp.util.WeakList;
import sun.awt.AWTSecurityManager;
diff --git a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java
index d83e45c..72f0c78 100644
--- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java
@@ -58,11 +58,11 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import net.sourceforge.jnlp.JNLPFile;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.util.FileUtils;
/**
- * Provides a panel to show inside a SecurityWarningDialog. These dialogs are
+ * Provides a panel to show inside a SecurityDialog. These dialogs are
* used to warn the user when either signed code (with or without signing
* issues) is going to be run, or when service permission (file, clipboard,
* printer, etc) is needed with unsigned code.
@@ -74,12 +74,12 @@ public class AccessWarningPane extends SecurityDialogPanel {
JCheckBox alwaysAllow;
Object[] extras;
- public AccessWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public AccessWarningPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
addComponents();
}
- public AccessWarningPane(SecurityWarningDialog x, Object[] extras, CertVerifier certVerifier) {
+ public AccessWarningPane(SecurityDialog x, Object[] extras, CertVerifier certVerifier) {
super(x, certVerifier);
this.extras = extras;
addComponents();
diff --git a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
index 5a959bc..2523fee 100644
--- a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
@@ -51,7 +51,7 @@ import javax.swing.JPanel;
public class AppletWarningPane extends SecurityDialogPanel {
- public AppletWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public AppletWarningPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
addComponents();
}
diff --git a/netx/net/sourceforge/jnlp/security/CertWarningPane.java b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
index 215b365..fcee971 100644
--- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
@@ -68,11 +68,11 @@ import net.sourceforge.jnlp.PluginBridge;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.security.KeyStores.Level;
import net.sourceforge.jnlp.security.KeyStores.Type;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.util.FileUtils;
/**
- * Provides the panel for using inside a SecurityWarningDialog. These dialogs are
+ * Provides the panel for using inside a SecurityDialog. These dialogs are
* used to warn the user when either signed code (with or without signing
* issues) is going to be run, or when service permission (file, clipboard,
* printer, etc) is needed with unsigned code.
@@ -84,7 +84,7 @@ public class CertWarningPane extends SecurityDialogPanel {
JCheckBox alwaysTrust;
CertVerifier certVerifier;
- public CertWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public CertWarningPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
this.certVerifier = certVerifier;
addComponents();
@@ -231,7 +231,7 @@ public class CertWarningPane extends SecurityDialogPanel {
private class MoreInfoButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
- SecurityWarningDialog.showMoreInfoDialog(parent.getJarSigner(),
+ SecurityDialog.showMoreInfoDialog(parent.getJarSigner(),
parent);
}
}
diff --git a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
index ebf8b3f..c6ea187 100644
--- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
+++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java
@@ -75,7 +75,7 @@ public class CertsInfoPane extends SecurityDialogPanel {
private String[] columnNames = { R("Field"), R("Value") };
protected ArrayList<String[][]> certsData;
- public CertsInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public CertsInfoPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
addComponents();
}
diff --git a/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java b/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java
index 2770291..36b3233 100644
--- a/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java
+++ b/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java
@@ -51,7 +51,7 @@ public class JNLPAuthenticator extends Authenticator {
String type = this.getRequestorType() == RequestorType.PROXY ? "proxy" : "web";
// request auth info from user
- PasswordAuthenticationDialog pwDialog = new PasswordAuthenticationDialog();
+ PasswordAuthenticationPane pwDialog = new PasswordAuthenticationPane();
PasswordAuthentication auth = pwDialog.askUser(this.getRequestingHost(), this.getRequestingPort(), this.getRequestingPrompt(), type);
// send it along
diff --git a/netx/net/sourceforge/jnlp/security/MoreInfoPane.java b/netx/net/sourceforge/jnlp/security/MoreInfoPane.java
index c76002b..b6a27d1 100644
--- a/netx/net/sourceforge/jnlp/security/MoreInfoPane.java
+++ b/netx/net/sourceforge/jnlp/security/MoreInfoPane.java
@@ -61,7 +61,7 @@ import javax.swing.SwingConstants;
*/
public class MoreInfoPane extends SecurityDialogPanel {
- public MoreInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public MoreInfoPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
addComponents();
}
@@ -105,7 +105,7 @@ public class MoreInfoPane extends SecurityDialogPanel {
private class CertInfoButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
- SecurityWarningDialog.showCertInfoDialog(parent.getJarSigner(),
+ SecurityDialog.showCertInfoDialog(parent.getJarSigner(),
parent);
}
}
diff --git a/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java b/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java
index 8d2919c..2e3564b 100644
--- a/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java
@@ -57,7 +57,7 @@ import net.sourceforge.jnlp.JNLPFile;
public class NotAllSignedWarningPane extends SecurityDialogPanel {
- public NotAllSignedWarningPane(SecurityWarningDialog x) {
+ public NotAllSignedWarningPane(SecurityDialog x) {
super(x);
addComponents();
}
diff --git a/netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java b/netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java
index a83506e..7a0411e 100644
--- a/netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java
+++ b/netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java
@@ -1,5 +1,5 @@
-/* PasswordAuthenticationDialog -- requests authentication information from users
- Copyright (C) 2009 Red Hat
+/* PasswordAuthenticationPane -- requests authentication information from users
+ Copyright (C) 2010 Red Hat
This file is part of IcedTea.
@@ -58,14 +58,14 @@ import net.sourceforge.jnlp.runtime.JNLPRuntime;
* Modal non-minimizable dialog to request http authentication credentials
*/
-public class PasswordAuthenticationDialog extends JDialog {
+public class PasswordAuthenticationPane extends JDialog {
- private JLabel jlInfo = new JLabel("");
- private JTextField jtfUserName = new JTextField();
- private JPasswordField jpfPassword = new JPasswordField();
+ private final JLabel jlInfo = new JLabel("");
+ private final JTextField jtfUserName = new JTextField();
+ private final JPasswordField jpfPassword = new JPasswordField();
private boolean userCancelled;
- public PasswordAuthenticationDialog() {
+ public PasswordAuthenticationPane() {
initialize();
}
@@ -237,7 +237,7 @@ public class PasswordAuthenticationDialog extends JDialog {
}
public static void main(String[] args) {
- PasswordAuthenticationDialog frame = new PasswordAuthenticationDialog();
+ PasswordAuthenticationPane frame = new PasswordAuthenticationPane();
PasswordAuthentication auth = frame.askUser("127.0.0.1", 3128, "Password for local proxy", "proxy");
diff --git a/netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
index 2bf829f..cb37395 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
@@ -1,5 +1,5 @@
-/* SecurityWarningDialog.java
- Copyright (C) 2008 Red Hat, Inc.
+/* SecurityDialog.java
+ Copyright (C) 2010 Red Hat, Inc.
This file is part of IcedTea.
@@ -39,8 +39,8 @@ package net.sourceforge.jnlp.security;
import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
-import net.sourceforge.jnlp.security.SecurityWarning.DialogType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.DialogType;
import java.awt.*;
@@ -56,32 +56,32 @@ import java.util.List;
* Provides methods for showing security warning dialogs for a wide range of
* JNLP security issues. Note that the security dialogs should be running in the
* secure AppContext - this class should not be used directly from an applet or
- * application. See {@link SecurityWarning} for a way to show security dialogs.
+ * application. See {@link SecurityDialogs} for a way to show security dialogs.
*
* @author <a href="mailto:[email protected]">Joshua Sumali</a>
*/
-public class SecurityWarningDialog extends JDialog {
+public class SecurityDialog extends JDialog {
/** The type of dialog we want to show */
- private DialogType dialogType;
+ private final DialogType dialogType;
/** The type of access that this dialog is for */
- private AccessType accessType;
+ private final AccessType accessType;
private SecurityDialogPanel panel;
/** The application file associated with this security warning */
- private JNLPFile file;
+ private final JNLPFile file;
- private CertVerifier certVerifier;
+ private final CertVerifier certVerifier;
- private X509Certificate cert;
+ private final X509Certificate cert;
/** An optional String array that's only necessary when a dialog
* label requires some parameters (e.g. showing which address an application
* is trying to connect to).
*/
- private Object[] extras;
+ private final Object[] extras;
/** Whether or not this object has been fully initialized */
private boolean initialized = false;
@@ -92,7 +92,7 @@ public class SecurityWarningDialog extends JDialog {
*/
private Object value;
- SecurityWarningDialog(DialogType dialogType, AccessType accessType,
+ SecurityDialog(DialogType dialogType, AccessType accessType,
JNLPFile file, CertVerifier jarSigner, X509Certificate cert, Object[] extras) {
super();
this.dialogType = dialogType;
@@ -107,34 +107,34 @@ public class SecurityWarningDialog extends JDialog {
}
/**
- * Construct a SecurityWarningDialog to display some sort of access warning
+ * Construct a SecurityDialog to display some sort of access warning
*/
- SecurityWarningDialog(DialogType dialogType, AccessType accessType,
+ SecurityDialog(DialogType dialogType, AccessType accessType,
JNLPFile file) {
this(dialogType, accessType, file, null, null, null);
}
/**
- * Create a SecurityWarningDialog to display a certificate-related warning
+ * Create a SecurityDialog to display a certificate-related warning
*/
- SecurityWarningDialog(DialogType dialogType, AccessType accessType,
+ SecurityDialog(DialogType dialogType, AccessType accessType,
JNLPFile file, CertVerifier jarSigner) {
this(dialogType, accessType, file, jarSigner, null, null);
}
/**
- * Create a SecurityWarningDialog to display a certificate-related warning
+ * Create a SecurityDialog to display a certificate-related warning
*/
- SecurityWarningDialog(DialogType dialogType, AccessType accessType,
+ SecurityDialog(DialogType dialogType, AccessType accessType,
CertVerifier certVerifier) {
this(dialogType, accessType, null, certVerifier, null, null);
}
/**
- * Create a SecurityWarningDialog to display some sort of access warning
+ * Create a SecurityDialog to display some sort of access warning
* with more information
*/
- SecurityWarningDialog(DialogType dialogType, AccessType accessType,
+ SecurityDialog(DialogType dialogType, AccessType accessType,
JNLPFile file, Object[] extras) {
this(dialogType, accessType, file, null, null, extras);
}
@@ -143,7 +143,7 @@ public class SecurityWarningDialog extends JDialog {
* Create a SecurityWarningDailog to display information about a single
* certificate
*/
- SecurityWarningDialog(DialogType dialogType, X509Certificate c) {
+ SecurityDialog(DialogType dialogType, X509Certificate c) {
this(dialogType, null, null, null, c, null);
}
@@ -162,10 +162,10 @@ public class SecurityWarningDialog extends JDialog {
* @param parent the parent option pane
*/
public static void showMoreInfoDialog(
- CertVerifier jarSigner, SecurityWarningDialog parent) {
+ CertVerifier jarSigner, SecurityDialog parent) {
- SecurityWarningDialog dialog =
- new SecurityWarningDialog(DialogType.MORE_INFO, null, null,
+ SecurityDialog dialog =
+ new SecurityDialog(DialogType.MORE_INFO, null, null,
jarSigner);
dialog.setModalityType(ModalityType.APPLICATION_MODAL);
dialog.setVisible(true);
@@ -179,8 +179,8 @@ public class SecurityWarningDialog extends JDialog {
* @param parent the parent option pane
*/
public static void showCertInfoDialog(CertVerifier jarSigner,
- SecurityWarningDialog parent) {
- SecurityWarningDialog dialog = new SecurityWarningDialog(DialogType.CERT_INFO,
+ SecurityDialog parent) {
+ SecurityDialog dialog = new SecurityDialog(DialogType.CERT_INFO,
null, null, jarSigner);
dialog.setLocationRelativeTo(parent);
dialog.setModalityType(ModalityType.APPLICATION_MODAL);
@@ -196,7 +196,7 @@ public class SecurityWarningDialog extends JDialog {
*/
public static void showSingleCertInfoDialog(X509Certificate c,
JDialog parent) {
- SecurityWarningDialog dialog = new SecurityWarningDialog(DialogType.SINGLE_CERT_INFO, c);
+ SecurityDialog dialog = new SecurityDialog(DialogType.SINGLE_CERT_INFO, c);
dialog.setLocationRelativeTo(parent);
dialog.setModalityType(ModalityType.APPLICATION_MODAL);
dialog.setVisible(true);
@@ -243,8 +243,8 @@ public class SecurityWarningDialog extends JDialog {
@Override
public void windowOpened(WindowEvent e) {
- if (e.getSource() instanceof SecurityWarningDialog) {
- SecurityWarningDialog dialog = (SecurityWarningDialog) e.getSource();
+ if (e.getSource() instanceof SecurityDialog) {
+ SecurityDialog dialog = (SecurityDialog) e.getSource();
dialog.setResizable(true);
centerDialog(dialog);
dialog.setValue(null);
@@ -325,7 +325,7 @@ public class SecurityWarningDialog extends JDialog {
}
/**
- * Called when the SecurityWarningDialog is hidden - either because the user
+ * Called when the SecurityDialog is hidden - either because the user
* made a choice (Ok, Cancel, etc) or closed the window
*/
@Override
@@ -345,7 +345,7 @@ public class SecurityWarningDialog extends JDialog {
}
}
- private List<ActionListener> listeners = new CopyOnWriteArrayList<ActionListener>();
+ private final List<ActionListener> listeners = new CopyOnWriteArrayList<ActionListener>();
/**
* Notify all the listeners that the user has made a decision using this
@@ -359,7 +359,7 @@ public class SecurityWarningDialog extends JDialog {
/**
* Adds an {@link ActionListener} which will be notified if the user makes a
- * choice using this SecurityWarningDialog. The listener should use {@link #getValue()}
+ * choice using this SecurityDialog. The listener should use {@link #getValue()}
* to actually get the user's response.
*/
public void addActionListener(ActionListener listener) {
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java b/netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java
index c958fff..60e8420 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java
@@ -6,8 +6,8 @@ import java.util.concurrent.Semaphore;
import javax.swing.JDialog;
import net.sourceforge.jnlp.JNLPFile;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
-import net.sourceforge.jnlp.security.SecurityWarning.DialogType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.DialogType;
/**
* Represents a message to the security framework to show a specific security
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java b/netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java
index 7beca96..2fbcb5b 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java
@@ -50,7 +50,7 @@ import net.sourceforge.jnlp.runtime.JNLPRuntime;
* Handles {@link SecurityDialogMessage}s and shows appropriate security
* dialogs.
* <p>
- * In the current architecture, {@link SecurityWarningDialog}s are shown from a
+ * In the current architecture, {@link SecurityDialog}s are shown from a
* different {@link AppContext} than the {@link AppContext} that asks for a
* security prompt. This ensures that all security prompts are isolated and
* their Look and Feel is not affected by the Look and Feel of the
@@ -86,7 +86,7 @@ public final class SecurityDialogMessageHandler implements Runnable {
/**
* Handles a single {@link SecurityDialogMessage} by showing a
- * {@link SecurityWarningDialog}.
+ * {@link SecurityDialog}.
* <p>
* Once the user has made a choice the
* {@link SecurityDialogMessage#toDispose} (if not null) is disposed and
@@ -98,7 +98,7 @@ public final class SecurityDialogMessageHandler implements Runnable {
private void handleMessage(SecurityDialogMessage message) {
final SecurityDialogMessage msg = message;
- final SecurityWarningDialog dialog = new SecurityWarningDialog(message.dialogType,
+ final SecurityDialog dialog = new SecurityDialog(message.dialogType,
message.accessType, message.file, message.certVerifier, message.certificate, message.extras);
dialog.addActionListener(new ActionListener() {
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java b/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java
index 8ffbbc1..e6007f4 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java
@@ -49,19 +49,19 @@ import javax.swing.JPanel;
*/
public abstract class SecurityDialogPanel extends JPanel {
- protected SecurityWarningDialog parent;
+ protected SecurityDialog parent;
JComponent initialFocusComponent = null;
CertVerifier certVerifier = null;
- public SecurityDialogPanel(SecurityWarningDialog dialog, CertVerifier certVerifier) {
+ public SecurityDialogPanel(SecurityDialog dialog, CertVerifier certVerifier) {
this.parent = dialog;
this.certVerifier = certVerifier;
this.setLayout(new BorderLayout());
}
- public SecurityDialogPanel(SecurityWarningDialog dialog) {
+ public SecurityDialogPanel(SecurityDialog dialog) {
this.parent = dialog;
this.setLayout(new BorderLayout());
}
@@ -75,12 +75,12 @@ public abstract class SecurityDialogPanel extends JPanel {
/**
* Create an ActionListener suitable for use with buttons. When this {@link ActionListener}
- * is invoked, it will set the value of the {@link SecurityWarningDialog} and then dispossed.
+ * is invoked, it will set the value of the {@link SecurityDialog} and then dispossed.
*
* @param buttonIndex the index of the button. By convention 0 = Yes. 1 = No, 2 = Cancel
* @return the ActionListener instance.
*/
- protected ActionListener createSetValueListener(SecurityWarningDialog dialog, int buttonIndex) {
+ protected ActionListener createSetValueListener(SecurityDialog dialog, int buttonIndex) {
return new SetValueHandler(dialog, buttonIndex);
}
@@ -103,9 +103,9 @@ public abstract class SecurityDialogPanel extends JPanel {
private class SetValueHandler implements ActionListener {
Integer buttonIndex;
- SecurityWarningDialog dialog;
+ SecurityDialog dialog;
- public SetValueHandler(SecurityWarningDialog dialog, int buttonIndex) {
+ public SetValueHandler(SecurityDialog dialog, int buttonIndex) {
this.dialog = dialog;
this.buttonIndex = buttonIndex;
}
diff --git a/netx/net/sourceforge/jnlp/security/SecurityWarning.java b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
index f3d6dfb..5f10d69 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityWarning.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
@@ -1,4 +1,4 @@
-/* SecurityWarningDialogFactory.java
+/* SecurityDialogs.java
Copyright (C) 2010 Red Hat, Inc.
This file is part of IcedTea.
@@ -55,12 +55,12 @@ import net.sourceforge.jnlp.runtime.JNLPRuntime;
* A factory for showing many possible types of security warning to the user.<p>
*
* This contains all the public methods that classes outside this package should
- * use instead of using {@link SecurityWarningDialog} directly.
+ * use instead of using {@link SecurityDialog} directly.
*
* All of these methods post a message to the
* {@link SecurityDialogMessageHandler} and block waiting for a response.
*/
-public class SecurityWarning {
+public class SecurityDialogs {
/** Types of dialogs we can create */
public static enum DialogType {
CERT_WARNING,
diff --git a/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java b/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java
index c60a084..1ed6b66 100644
--- a/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java
+++ b/netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java
@@ -46,7 +46,7 @@ import javax.swing.tree.TreeSelectionModel;
public class SingleCertInfoPane extends CertsInfoPane {
- public SingleCertInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ public SingleCertInfoPane(SecurityDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
}
diff --git a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
index 01689ba..3285b85 100644
--- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
+++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java
@@ -54,7 +54,7 @@ import sun.security.validator.ValidatorException;
import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
/**
* This class implements an X509 Trust Manager. The certificates it trusts are
@@ -378,7 +378,7 @@ final public class VariableX509TrustManager extends X509ExtendedTrustManager {
private boolean askUser(X509Certificate[] chain, String authType,
boolean isTrusted, boolean hostMatched,
String hostName) {
- return SecurityWarning.showCertWarningDialog(
+ return SecurityDialogs.showCertWarningDialog(
AccessType.UNVERIFIED, null,
new HttpsCertVerifier(this, chain, authType,
isTrusted, hostMatched,
diff --git a/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java b/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
index 21666d7..ed71d0d 100644
--- a/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
+++ b/netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java
@@ -75,7 +75,7 @@ import javax.swing.table.DefaultTableModel;
import net.sourceforge.jnlp.security.CertificateUtils;
import net.sourceforge.jnlp.security.KeyStores;
import net.sourceforge.jnlp.security.SecurityUtil;
-import net.sourceforge.jnlp.security.SecurityWarningDialog;
+import net.sourceforge.jnlp.security.SecurityDialog;
import net.sourceforge.jnlp.security.KeyStores.Level;
import net.sourceforge.jnlp.util.FileUtils;
@@ -478,7 +478,7 @@ public class CertificatePane extends JPanel {
int selectedRow = table.getSelectedRow();
if (selectedRow != -1 && selectedRow >= 0) {
X509Certificate c = certs.get(selectedRow);
- SecurityWarningDialog.showSingleCertInfoDialog(c, parent);
+ SecurityDialog.showSingleCertInfoDialog(c, parent);
}
}
}
diff --git a/netx/net/sourceforge/jnlp/services/ServiceUtil.java b/netx/net/sourceforge/jnlp/services/ServiceUtil.java
index d030395..55c2172 100644
--- a/netx/net/sourceforge/jnlp/services/ServiceUtil.java
+++ b/netx/net/sourceforge/jnlp/services/ServiceUtil.java
@@ -40,8 +40,8 @@ import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.ApplicationInstance;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
-import net.sourceforge.jnlp.security.SecurityWarning;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
/**
* Provides static methods to interact useful for using the JNLP
@@ -280,7 +280,7 @@ public class ServiceUtil {
//from resources.jar.
Boolean b = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
public Boolean run() {
- boolean b = SecurityWarning.showAccessWarningDialog(tmpType,
+ boolean b = SecurityDialogs.showAccessWarningDialog(tmpType,
tmpApp.getJNLPFile(), tmpExtras);
return new Boolean(b);
}
diff --git a/netx/net/sourceforge/jnlp/services/XClipboardService.java b/netx/net/sourceforge/jnlp/services/XClipboardService.java
index 6f462e5..22fb0cb 100644
--- a/netx/net/sourceforge/jnlp/services/XClipboardService.java
+++ b/netx/net/sourceforge/jnlp/services/XClipboardService.java
@@ -39,7 +39,7 @@ package net.sourceforge.jnlp.services;
import javax.jnlp.*;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import java.awt.datatransfer.Transferable;
import java.awt.Toolkit;
diff --git a/netx/net/sourceforge/jnlp/services/XExtendedService.java b/netx/net/sourceforge/jnlp/services/XExtendedService.java
index 88da724..f03c199 100644
--- a/netx/net/sourceforge/jnlp/services/XExtendedService.java
+++ b/netx/net/sourceforge/jnlp/services/XExtendedService.java
@@ -22,7 +22,7 @@ import java.io.IOException;
import javax.jnlp.ExtendedService;
import javax.jnlp.FileContents;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
/**
* Implementation of ExtendedService
diff --git a/netx/net/sourceforge/jnlp/services/XFileOpenService.java b/netx/net/sourceforge/jnlp/services/XFileOpenService.java
index ebda3cb..7e004e3 100644
--- a/netx/net/sourceforge/jnlp/services/XFileOpenService.java
+++ b/netx/net/sourceforge/jnlp/services/XFileOpenService.java
@@ -40,7 +40,7 @@ package net.sourceforge.jnlp.services;
import java.io.*;
import javax.jnlp.*;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import javax.swing.JFileChooser;
diff --git a/netx/net/sourceforge/jnlp/services/XFileSaveService.java b/netx/net/sourceforge/jnlp/services/XFileSaveService.java
index ff35756..a50afe0 100644
--- a/netx/net/sourceforge/jnlp/services/XFileSaveService.java
+++ b/netx/net/sourceforge/jnlp/services/XFileSaveService.java
@@ -40,7 +40,7 @@ package net.sourceforge.jnlp.services;
import java.io.*;
import javax.jnlp.*;
-import net.sourceforge.jnlp.security.SecurityWarning.AccessType;
+import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.util.FileUtils;
import javax.swing.JFileChooser;