changeset 539:d076dbf927b8

New message for when JNLP is fully signed by different certs
author Adam Domurad <adomurad@redhat.com>
date Fri, 19 Oct 2012 15:14:09 -0400
parents 8eb44f9dc27c
children 5b4a8c846308
files ChangeLog netx/net/sourceforge/jnlp/resources/Messages.properties netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
diffstat 3 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 19 15:08:40 2012 -0400
+++ b/ChangeLog	Fri Oct 19 15:14:09 2012 -0400
@@ -30,6 +30,15 @@
 
 2012-10-19  Adam Domurad  <adomurad@redhat.com>
 
+	New message for signer mismatch in JNLP applications.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: Added 
+	message 'The JNLP application is not fully signed by a single cert.'
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Message 
+	thrown when JNLP's jcv.allJarsSigned() is true but not 
+	jcv.isFullySigned();
+
+2012-10-19  Adam Domurad  <adomurad@redhat.com>
+
 	Fixes JCV#isTriviallySigned(). Reproducer 'EmptySignedJar' passes 
 	again.
 	* netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Remove 
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Fri Oct 19 15:08:40 2012 -0400
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Fri Oct 19 15:14:09 2012 -0400
@@ -78,6 +78,8 @@
 LCantDetermineMainClassInfo=Could not determine the main class for this application.
 LUnsignedJarWithSecurity=Cannot grant permissions to unsigned jars.
 LUnsignedJarWithSecurityInfo=Application requested security permissions, but jars are not signed.
+LSignedJNLPAppDifferentCerts=The JNLP application is not fully signed by a single cert.
+LSignedJNLPAppDifferentCertsInfo=The JNLP application has its components individually signed, however there must be a common signer to all entries.
 LSignedAppJarUsingUnsignedJar=Signed application using unsigned jars.
 LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't.
 LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file.
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Fri Oct 19 15:08:40 2012 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Fri Oct 19 15:14:09 2012 -0400
@@ -317,7 +317,11 @@
              *
              */
             if (!file.getSecurity().getSecurityType().equals(SecurityDesc.SANDBOX_PERMISSIONS) && !signing) {
-                throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LUnsignedJarWithSecurity"), R("LUnsignedJarWithSecurityInfo"));
+                if (jcv.allJarsSigned()) {
+                    throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedJNLPAppDifferentCerts"), R("LSignedJNLPAppDifferentCertsInfo"));
+                } else {
+                    throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LUnsignedJarWithSecurity"), R("LUnsignedJarWithSecurityInfo"));
+                }
             } else if (signing == true) {
                 this.security = file.getSecurity();
             } else {