https://issues.apache.org/bugzilla/show_bug.cgi?id=50081
Summary: SignJar: error signing if path for signing jar
contains relative elements
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
If path for signing jar look like c:\aaa\..\bbb\my.jar and not destDir nor
destFile are defined sign procedure finish with error:
jzfile = 43261776,
total = 5,
name = c:\bbb\my.jar\com.borland.orbit_8.2.3.v20101012-1621.jar,
i = 1,
message = couldn't read LOC header
at java.util.zip.ZipFile$3.nextElement(ZipFile.java:429)
at java.util.zip.ZipFile$3.nextElement(ZipFile.java:415)
at sun.security.tools.JarSigner.getManifestFile(JarSigner.java:1449)
at sun.security.tools.JarSigner.signJar(JarSigner.java:836)
at sun.security.tools.JarSigner.run(JarSigner.java:194)
at sun.security.tools.JarSigner.main(JarSigner.java:75)
It happened because in SignJar.signOneJar(File jarSource, File jarTarget)
jarSource = c:\aaa\..\bbb\my.jar
jarTarget = c:\bbb\my.jar
It points on the same file but !jarSource.equals(targetFile)
So code add "-signedjar" argument in command call but should not.
SignJar.signOneJar:377
//DO NOT SET THE -signedjar OPTION if source==dest
//unless you like fielding hotspot crash reports
if (!jarSource.equals(targetFile)) {
addValue(cmd, "-signedjar");
addValue(cmd, targetFile.getPath());
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.