Skip to content

Conversation

franferrax
Copy link
Contributor

@franferrax franferrax commented Sep 18, 2025

Hi, this is a backport of openjdk/jdk@bbd5b17. The backport is not clean because of the following reasons.

Internationalization files

21u doesn't have JDK-8345940: Migrate security-related resources from Java classes to properties files (openjdk/jdk@9a49418), so changes from resources/jarsigner.properties, were applied to Resources.java.

Also, internationalized messages were added later, so they have been recovered from JDK-8359761: JDK 25 RDP1 L10n resource files update (openjdk/jdk@da7080f):

  • New messages in resources/jarsigner_de.properties were applied to Resources_de.java
  • New messages in resources/jarsigner_ja.properties were applied to Resources_ja.java
  • New messages in resources/jarsigner_zh_CN.properties were applied to Resources_zh_CN.java

To convert these messages, I created the PropertiesToResources.java small program.

$\mbox{\color{red}UPDATE}$ (5d7505c): all the internationalized messages have been removed, as they aren't typically included in backports (thanks @jerboaa for letting me know).

Man pages

21u doesn't have JDK-8344056: Use markdown format for man pages (openjdk/jdk@475feb0), so changes from jarsigner.md, were applied to jarsigner.1.

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/cds/appcds/SignedJar.java is not failing after the backport, JDK-8353330 was not included.

Testing

  • Besides the tier1 run from the GitHub actions (all passed), I ran a regression using the following categories and individual tests:
    • test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java
    • test/jdk/java/security/SignedJar
    • test/jdk/java/util/jar
    • test/jdk/jdk/security/jarsigner
    • test/jdk/sun/security/pkcs/pkcs7
    • test/jdk/sun/security/tools/jarsigner
      • Includes VerifyJarEntryName.java, created for this issue
    • test/jdk/sun/security/tools/keytool

No regressions were found against the current master branch (10df11a).


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

Warning

 ⚠️ Found leading lowercase letter in issue title for 8339280: jarsigner -verify performs cross-checking between CEN and LOC

Issues

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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2235

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 18, 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 18, 2025

@franferrax This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

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: sgehwolf, abakhtin

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 30 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jerboaa, @alexeybakhtin) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

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

openjdk bot commented Sep 18, 2025

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

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Sep 18, 2025
@franferrax
Copy link
Contributor Author

/issue add 8353299

@franferrax
Copy link
Contributor Author

/issue add 8367782

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 18, 2025
@openjdk
Copy link

openjdk bot commented Sep 18, 2025

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

@openjdk
Copy link

openjdk bot commented Sep 18, 2025

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

@mlbridge
Copy link

mlbridge bot commented Sep 18, 2025

Webrevs

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove changes to Resources_de.java, Resources_ja.java and Resources_zh_CN.java since those are part of a different bug and usually get updated in bulk. Looks good otherwise.

@franferrax
Copy link
Contributor Author

Thanks @jerboaa, done in 5d7505c.

@alexeybakhtin
Copy link

alexeybakhtin commented Sep 19, 2025

@franferrax Shouldn't we update the copyright years in src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java, src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java, and src/jdk.jartool/share/man/jarsigner.1 files.
It is not part of the original patch because copyright year is 2025 for these files already

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks OK to me.

@jerboaa
Copy link
Contributor

jerboaa commented Sep 22, 2025

@franferrax Shouldn't we update the copyright years in src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java, src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java, and src/jdk.jartool/share/man/jarsigner.1 files.
It is not part of the original patch because copyright year is 2025 for these files already

Not in a backport.

@openjdk
Copy link

openjdk bot commented Sep 22, 2025

⚠️ @franferrax This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

Copy link

@alexeybakhtin alexeybakhtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@franferrax
Copy link
Contributor Author

Thank you for your reviews, @alexeybakhtin and @jerboaa.

@franferrax
Copy link
Contributor Author

/approval request JDK-8339280 enhances the jarsigner utility with cross-validation of JAR entries. Subsequent test updates (JDK-8353299 & JDK-8367782) are included for better reliability and coverage. Please find details about the testing in the pull request description.

@openjdk
Copy link

openjdk bot commented Sep 22, 2025

@franferrax
8339280: The approval request has been created successfully.
8353299: The approval request has been created successfully.
8367782: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Sep 22, 2025
@jerboaa
Copy link
Contributor

jerboaa commented Sep 22, 2025

/approve yes

@openjdk
Copy link

openjdk bot commented Sep 22, 2025

@jerboaa
8339280: The approval request has been approved.
8353299: The approval request has been approved.
8367782: The approval request has been approved.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 22, 2025
@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Sep 22, 2025
@franferrax
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 23, 2025
@openjdk
Copy link

openjdk bot commented Sep 23, 2025

@franferrax
Your change (at version 5d7505c) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Sep 23, 2025

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 23, 2025

Going to push as commit 3e41a78.
Since your change was applied there have been 30 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 23, 2025
@openjdk openjdk bot closed this Sep 23, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Sep 23, 2025
@openjdk
Copy link

openjdk bot commented Sep 23, 2025

@jerboaa @franferrax Pushed as commit 3e41a78.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

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 integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants