diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/tools/JarCertVerifier.java | 26 |
3 files changed, 15 insertions, 20 deletions
@@ -1,3 +1,11 @@ +2012-06-12 Adam Domurad <[email protected]> + + Fixes PR722, javaws failing to run with unsigned content in META-INF/ + * NEWS: Added entry: Fixes PR722 + * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Changed + isSignatureRelated => isMetaInfFile. Now all files under META-INF/ are + disregarded in checking the jar signage. + 2012-06-11 Jiri Vanek <[email protected]> Implemented xml logging backend @@ -18,6 +18,7 @@ New in release 1.3 (2012-XX-XX): - PR895: IcedTea-Web searches for missing classes on each loadClass or findClass - PR861: Allow loading from non codebase hosts. Allow code to connect to hosting server - PR518: NPString.utf8characters not guaranteed to be nul-terminated + - PR722: META-INF/ unsigned entries should be ignored in signing * Common - PR918: java applet windows uses a low resulution black/white icon diff --git a/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java b/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java index fa22675..f98241d 100644 --- a/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java +++ b/netx/net/sourceforge/jnlp/tools/JarCertVerifier.java @@ -277,7 +277,7 @@ public class JarCertVerifier implements CertVerifier { anySigned |= isSigned; boolean shouldHaveSignature = !je.isDirectory() - && !signatureRelated(name); + && !isMetaInfFile(name); hasUnsignedEntry |= shouldHaveSignature && !isSigned; @@ -438,32 +438,18 @@ public class JarCertVerifier implements CertVerifier { } /** - * signature-related files include: + * Returns whether a file is in META-INF, and thus does not require signing. + * + * Signature-related files under META-INF include: * . META-INF/MANIFEST.MF * . META-INF/SIG-* * . META-INF/*.SF * . META-INF/*.DSA * . META-INF/*.RSA - * - * Required for verifyJar() */ - private boolean signatureRelated(String name) { + static private boolean isMetaInfFile(String name) { String ucName = name.toUpperCase(); - if (ucName.equals(JarFile.MANIFEST_NAME) || - ucName.equals(META_INF) || - (ucName.startsWith(SIG_PREFIX) && - ucName.indexOf("/") == ucName.lastIndexOf("/"))) { - return true; - } - - if (ucName.startsWith(META_INF) && - SignatureFileVerifier.isBlockOrSF(ucName)) { - // .SF/.DSA/.RSA files in META-INF subdirs - // are not considered signature-related - return (ucName.indexOf("/") == ucName.lastIndexOf("/")); - } - - return false; + return ucName.startsWith(META_INF); } /** |