Skip to content

Conversation

franferrax
Copy link
Contributor

@franferrax franferrax commented Sep 19, 2025

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:
  • 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.BeforeAllorg.junit.BeforeClass
      • org.junit.jupiter.api.BeforeEachorg.junit.Before
      • org.junit.jupiter.api.Testorg.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 8339280: jarsigner -verify performs cross-checking between CEN and LOC 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}$ (28348b2): 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 (openjdk/jdk@acd4da4) and JDK-8367782 (openjdk/jdk@1b9a116) 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 was not included.

Testing

  • Besides the tier1 run from the GitHub actions (similar results as the current master run), I ran a regression using the following categories and individual tests:
    • jdk/test/com/sun/jarsigner
    • jdk/test/java/security/SignedJar
    • jdk/test/java/util/jar
    • jdk/test/sun/security/pkcs/pkcs7
    • jdk/test/sun/security/tools/jarsigner
      • Includes VerifyJarEntryName.java, created for this issue
    • jdk/test/sun/security/tools/keytool

No regressions were found against the current master branch (9a4bc2d).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8339280 needs maintainer approval
  • JDK-8353299 needs maintainer approval
  • JDK-8367782 needs maintainer approval

Issues

  • JDK-8339280: jarsigner -verify performs cross-checking between CEN and LOC (Enhancement - P4)
  • JDK-8353299: VerifyJarEntryName.java test fails (Bug - P3)
  • JDK-8367782: VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/699/head:pull/699
$ git checkout pull/699

Update a local copy of the PR:
$ git checkout pull/699
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/699/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 699

View PR using the GUI difftool:
$ git pr show -t 699

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/699.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 19, 2025

👋 Welcome back fferrari! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 19, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport bbd5b174c50346152a624317b6bd76ec48f7e551 8339280: jarsigner -verify performs cross-checking between CEN and LOC Sep 19, 2025
@openjdk
Copy link

openjdk bot commented Sep 19, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels Sep 19, 2025
@franferrax
Copy link
Contributor Author

/issue add 8353299

@franferrax
Copy link
Contributor Author

/issue add 8367782

@mlbridge
Copy link

mlbridge bot commented Sep 19, 2025

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@franferrax
Adding additional issue to issue list: 8353299: VerifyJarEntryName.java test fails.

@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@franferrax
Adding additional issue to issue list: 8367782: VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Port of a pull request already in a different code base rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant