aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2013-03-26 14:57:33 -0400
committerAdam Domurad <[email protected]>2013-03-26 14:57:33 -0400
commit58b4d6e3dc3a95cfbc6f369287aca04763522e48 (patch)
treec31e0146381288222138a667844893106772d87e /netx/net/sourceforge/jnlp/security/SecurityDialogs.java
parentc4f2dc4c8dc8c025c5d27c627717a164755986ae (diff)
Integration of unsigned applet confirmation dialogue.
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/SecurityDialogs.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialogs.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialogs.java b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
index c5bf824..a1af82e 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java
@@ -37,6 +37,8 @@ exception statement from your version.
package net.sourceforge.jnlp.security;
+import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteUnsignedApplet;
+
import java.awt.Dialog.ModalityType;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
@@ -70,6 +72,7 @@ public class SecurityDialogs {
SINGLE_CERT_INFO,
ACCESS_WARNING,
NOTALLSIGNED_WARNING,
+ UNSIGNED_WARNING, /* requires confirmation with 'high-security' setting */
APPLET_WARNING,
AUTHENTICATION,
}
@@ -86,6 +89,7 @@ public class SecurityDialogs {
VERIFIED,
UNVERIFIED,
NOTALLSIGNED,
+ UNSIGNED, /* requires confirmation with 'high-security' setting */
SIGNING_ERROR
}
@@ -173,6 +177,26 @@ public class SecurityDialogs {
}
/**
+ * Shows a warning dialog for when a plugin applet is unsigned.
+ * This is used with 'high-security' setting.
+ *
+ * @return true if permission was granted by the user, false otherwise.
+ */
+ public static ExecuteUnsignedApplet showUnsignedWarningDialog(JNLPFile file) {
+
+ if (!shouldPromptUser()) {
+ return ExecuteUnsignedApplet.NO;
+ }
+
+ final SecurityDialogMessage message = new SecurityDialogMessage();
+ message.dialogType = DialogType.UNSIGNED_WARNING;
+ message.accessType = AccessType.UNSIGNED;
+ message.file = file;
+
+ return (ExecuteUnsignedApplet)getUserResponse(message);
+ }
+
+ /**
* Shows a security warning dialog according to the specified type of
* access. If <code>type</code> is one of AccessType.VERIFIED or
* AccessType.UNVERIFIED, extra details will be available with regards