aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net
diff options
context:
space:
mode:
authorAndrew Azores <[email protected]>2013-10-29 17:30:18 -0400
committerAndrew Azores <[email protected]>2013-10-29 17:30:18 -0400
commitf84a75fee1efac58cbb49414635a3655b99a4124 (patch)
tree5f06ff4dd5f156e466c6149390ebc46569af72b3 /netx/net
parent7a81d6c45f69526857236d9d9d985602096caca6 (diff)
Fix PR1513, signed applets with external main-class support
* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (initializeResources) ask for user approval rather than throwing LaunchException for signed applets with external main-class
Diffstat (limited to 'netx/net')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java23
1 files changed, 8 insertions, 15 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index ed449c7..b2ea5f8 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -682,33 +682,26 @@ public class JNLPClassLoader extends URLClassLoader {
if (jcv.isFullySigned()) {
signing = true;
- if (!jcv.allJarsSigned() &&
- !SecurityDialogs.showNotAllSignedWarningDialog(file))
- throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
-
// Check for main class in the downloaded jars, and check/verify signed JNLP fill
checkForMain(initialJars);
// If jar with main class was not found, check available resources
- while (!foundMainJar && available != null && available.size() != 0)
+ while (!foundMainJar && available != null && available.size() != 0)
addNextResource();
// If the jar with main class was not found, check extension
// jnlp's resources
foundMainJar = foundMainJar || hasMainInExtensions();
- // If jar with main class was not found and there are no more
- // available jars, throw a LaunchException
- if (file.getLaunchInfo() != null) {
- if (!foundMainJar
- && (available == null || available.size() == 0))
- throw new LaunchException(file, null, R("LSFatal"),
- R("LCClient"), R("LCantDetermineMainClass"),
- R("LCantDetermineMainClassInfo"));
- }
+ boolean externalMainClass = (file.getLaunchInfo() != null && !foundMainJar
+ && (available == null || available.size() == 0));
+
+ if ((!jcv.allJarsSigned() || externalMainClass) &&
+ !SecurityDialogs.showNotAllSignedWarningDialog(file))
+ throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo"));
// If main jar was found, but a signed JNLP file was not located
- if (!isSignedJNLP && foundMainJar)
+ if (!isSignedJNLP && foundMainJar)
file.setSignedJNLPAsMissing();
//user does not trust this publisher