[jdk8u-dev] Integrated: 8339280: jarsigner -verify performs cross-checking between CEN and LOC
Francisco Ferrari Bihurriet
fferrari at openjdk.org
Thu Nov 27 11:08:08 UTC 2025
On Fri, 19 Sep 2025 10:20:46 GMT, Francisco Ferrari Bihurriet <fferrari at openjdk.org> wrote:
> Hi, this is a backport of openjdk/jdk11u-dev#3098. The backport isn't clean, because of the following:
>
> * File paths that require adjustment for 8u
> * In `Main.java`, trivial context differences and code that needs adjustment from 11u to 8u:
> * `java.nio.file.Path.of()` ⟶ `java.nio.file.Paths.get()`
> * `InputStream::transferTo(OutputStream.nullOutputStream())` ⟶ [original code before a review suggestion](https://github.com/openjdk/jdk/pull/23532/commits/ef546f4b778e8a1f43dbedc56a79bb53d169a1e7#diff-7083af3b8473a092987afa0bbb4d1694664649534bac716f6b9cd3c3b9833219L1185-L1186)
> * In the test (`VerifyJarEntryName.java`), code that needs adjustment from 11u to 8u:
> * `@library /test/lib` ⟶ `@library /lib/testlibrary`
> * JUnit 5 ⟶ JUnit 4
> * `org.junit.jupiter.api.BeforeAll` ⟶ `org.junit.BeforeClass`
> * `org.junit.jupiter.api.BeforeEach` ⟶ `org.junit.Before`
> * `org.junit.jupiter.api.Test` ⟶ `org.junit.Test`
> * `java.nio.file.Path.of()` ⟶ `java.nio.file.Paths.get()`
> * `@BeforeClass`, `@Before` and `@Test` methods must be public
> * Can't use `var`
> * `Arrays.equals(a, start, end, b, 0, b.length)` ⟶ `Arrays.equals(Arrays.copyOfRange(a, start, end), b)` (`Arrays::equals` with offsets not present in 8u)
> * ~~NOTE: for the Japanese manpages translation approach, please refer to openjdk/jdk11u-dev#3098~~
> * ~~I updated `jdk/src/linux/doc/man/ja/jarsigner.1` and `jdk/src/solaris/doc/sun/man/man1/ja/jarsigner.1` (identical), and left `dk/src/bsd/doc/man/ja/jarsigner.1` untouched (doesn't have any content besides the headers)~~
> * $\mbox{\color{red}UPDATE}$ (28348b29f892b685d9098c4560128a8bfb206afd): all the internationalized messages have been removed, as they aren't typically included in backports (thanks @jerboaa for letting me know).
>
> #### Related issues ("relates to" Jira issue links)
>
> [JDK-8353299](https://bugs.openjdk.org/browse/JDK-8353299 "VerifyJarEntryName.java test fails") (openjdk/jdk at acd4da49a01760599ec4c325ff6c56f53ba5cc9c) and [JDK-8367782](https://bugs.openjdk.org/browse/JDK-8367782 "VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName") (openjdk/jdk at 1b9a11682d5f73885213822423bfce8dfc17febd) were also included as part of this backport. They are test-only changes that improve the reliability and coverage of `VerifyJarEntryName.java`.
>
> Since `test/hotspot/jtreg/runtime/appcds/SignedJar.java` is not present in 8u, [JDK-8353330](https://bugs.open...
This pull request has now been integrated.
Changeset: 5452da9a
Author: Francisco Ferrari Bihurriet <fferrari at openjdk.org>
Committer: Severin Gehwolf <sgehwolf at openjdk.org>
URL: https://git.openjdk.org/jdk8u-dev/commit/5452da9aa2428b6fa143ea3af9cc7d261abf99b3
Stats: 335 lines in 6 files changed: 335 ins; 0 del; 0 mod
8339280: jarsigner -verify performs cross-checking between CEN and LOC
8353299: VerifyJarEntryName.java test fails
8367782: VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName
Reviewed-by: abakhtin, sgehwolf, andrew
Backport-of: bbd5b174c50346152a624317b6bd76ec48f7e551
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/699
More information about the jdk8u-dev
mailing list