aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/SecurityDialog.java
diff options
context:
space:
mode:
authorSaad Mohammad <smohammad@redhat.com>2011-08-22 15:09:47 -0400
committerSaad Mohammad <smohammad@redhat.com>2011-08-22 15:09:47 -0400
commitca57a77f66bbca5e2be1da83868ba0b5daab0ca3 (patch)
tree69fae35674d0d6c7059b2eea12685a3fffcb89a2 /netx/net/sourceforge/jnlp/security/SecurityDialog.java
parent3fdbc63fe69b247c9aaa49a322142a2085248095 (diff)
Checks and verifies a signed JNLP file at the launch of the application. A signed JNLP warning is displayed if appropriate.
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/SecurityDialog.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialog.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialog.java b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
index 1988e5e..8ffbdd4 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialog.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
@@ -92,6 +92,9 @@ public class SecurityDialog extends JDialog {
*/
private Object value;
+ /** Should show signed JNLP file warning */
+ private boolean requiresSignedJNLPWarning;
+
SecurityDialog(DialogType dialogType, AccessType accessType,
JNLPFile file, CertVerifier jarSigner, X509Certificate cert, Object[] extras) {
super();
@@ -103,6 +106,9 @@ public class SecurityDialog extends JDialog {
this.extras = extras;
initialized = true;
+ if(file != null)
+ requiresSignedJNLPWarning= file.requiresSignedJNLPWarning();
+
initDialog();
}
@@ -164,8 +170,9 @@ public class SecurityDialog extends JDialog {
public static void showMoreInfoDialog(
CertVerifier jarSigner, SecurityDialog parent) {
+ JNLPFile file= parent.getFile();
SecurityDialog dialog =
- new SecurityDialog(DialogType.MORE_INFO, null, null,
+ new SecurityDialog(DialogType.MORE_INFO, null, file,
jarSigner);
dialog.setModalityType(ModalityType.APPLICATION_MODAL);
dialog.setVisible(true);
@@ -372,5 +379,10 @@ public class SecurityDialog extends JDialog {
public void addActionListener(ActionListener listener) {
listeners.add(listener);
}
+
+ public boolean requiresSignedJNLPWarning()
+ {
+ return requiresSignedJNLPWarning;
+ }
}