The sequencing of JDK-7194449 and JDK-8031572 in OpenJDK 7 has led to the EntriesOrder.java test introduced by JDK-8031572 not being adapted to keytool and jarsigner now being in their own packages:
----------System.err:(11/541)----------
/home/andrew/projects/openjdk/upstream/jdk7/jdk/test/sun/security/tools/jarsigner/EntriesOrder.java:78: error: cannot find symbol
sun.security.tools.KeyTool.main(
^
symbol: class KeyTool
location: package sun.security.tools
/home/andrew/projects/openjdk/upstream/jdk7/jdk/test/sun/security/tools/jarsigner/EntriesOrder.java:81: error: cannot find symbol
sun.security.tools.JarSigner.main(
^
symbol: class JarSigner
location: package sun.security.tools
2 errors
result: Failed. Compilation failed: Compilation failed
In 8u:
JDK-7194449 is introduced on 2012-10-14
JDK-8031572 is introduced on 2014-01-21
sun.security.tools.{keytool,jarsigner}.Main classes
In 7u:
JDK-8031572 is introduced on 2014-01-21 (as with 8u)
JDK-7194449 is introduced on 2016-13-07
so the version of 8031572 in 7u uses sun.security.tools.JarSigner & sun.security.tools.KeyTool, as this was correct for 7u in 2014, and this wasn't fixed when 7194449 was backported in 2016, because the original patch in 8u predated 8031572, being from 2012.
It's easily fixed from a diff of the 7u & 8u versions:
@@ -70,10 +75,10 @@
if (!m.run("cvf a.jar a META-INF/inf".split(" "))) {
throw new Exception("jar creation failed");
}
- sun.security.tools.KeyTool.main(
+ sun.security.tools.keytool.Main.main(
("-keystore jks -storepass changeit -keypass changeit -dname" +
" CN=A -alias a -genkeypair -keyalg rsa").split(" "));
- sun.security.tools.JarSigner.main(
+ sun.security.tools.jarsigner.Main.main(
"-keystore jks -storepass changeit a.jar a".split(" "));
m = new sun.tools.jar.Main(System.out, System.err, "jar");
if (!m.run("xvf a.jar".split(" "))) {
----------System.err:(11/541)----------
/home/andrew/projects/openjdk/upstream/jdk7/jdk/test/sun/security/tools/jarsigner/EntriesOrder.java:78: error: cannot find symbol
sun.security.tools.KeyTool.main(
^
symbol: class KeyTool
location: package sun.security.tools
/home/andrew/projects/openjdk/upstream/jdk7/jdk/test/sun/security/tools/jarsigner/EntriesOrder.java:81: error: cannot find symbol
sun.security.tools.JarSigner.main(
^
symbol: class JarSigner
location: package sun.security.tools
2 errors
result: Failed. Compilation failed: Compilation failed
In 8u:
sun.security.tools.{keytool,jarsigner}.Main classes
In 7u:
so the version of 8031572 in 7u uses sun.security.tools.JarSigner & sun.security.tools.KeyTool, as this was correct for 7u in 2014, and this wasn't fixed when 7194449 was backported in 2016, because the original patch in 8u predated 8031572, being from 2012.
It's easily fixed from a diff of the 7u & 8u versions:
@@ -70,10 +75,10 @@
if (!m.run("cvf a.jar a META-INF/inf".split(" "))) {
throw new Exception("jar creation failed");
}
- sun.security.tools.KeyTool.main(
+ sun.security.tools.keytool.Main.main(
("-keystore jks -storepass changeit -keypass changeit -dname" +
" CN=A -alias a -genkeypair -keyalg rsa").split(" "));
- sun.security.tools.JarSigner.main(
+ sun.security.tools.jarsigner.Main.main(
"-keystore jks -storepass changeit a.jar a".split(" "));
m = new sun.tools.jar.Main(System.out, System.err, "jar");
if (!m.run("xvf a.jar".split(" "))) {
- relates to
-
JDK-8031572 jarsigner -verify exits with 0 when a jar file is not properly signed
- Closed
-
JDK-7194449 String resources for Key Tool and Policy Tool should be in their respective packages
- Closed