Skip to content

Conversation

@shipilev
Copy link
Member

@shipilev shipilev commented Dec 18, 2024

Backporting this due to wider customer interest in aligning JDK behavior with other SSL implementations. Both patches apply cleanly. First patch does the fix. Second patch fixes the test.

Additional testing:

  • macos-aarch64-server-release, new test fails without the change, passes with it
  • macos-aarch64-server-release, sun/security/x509/
  • linux-x86_64-server-release, jdk_security

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-8320372 needs maintainer approval
  • JDK-8347424 needs maintainer approval
  • JDK-8311546 needs maintainer approval

Issues

  • JDK-8311546: Certificate name constraints improperly validated with leading period (Bug - P3 - Approved)
  • JDK-8320372: test/jdk/sun/security/x509/DNSName/LeadingPeriod.java validity check failed (Bug - P2 - Approved)
  • JDK-8347424: Fix and rewrite sun/security/x509/DNSName/LeadingPeriod.java test (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1268

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 18, 2024

👋 Welcome back shade! 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 Dec 18, 2024

@shipilev 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:

8311546: Certificate name constraints improperly validated with leading period
8320372: test/jdk/sun/security/x509/DNSName/LeadingPeriod.java validity check failed
8347424: Fix and rewrite sun/security/x509/DNSName/LeadingPeriod.java test

Reviewed-by: simonis

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 79 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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport bfaf5704e7e71f968b716b5f448860e9cda721b4 8311546: Certificate name constraints improperly validated with leading period Dec 18, 2024
@openjdk
Copy link

openjdk bot commented Dec 18, 2024

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 Dec 18, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 18, 2024

Webrevs

@shipilev
Copy link
Member Author

/issue add JDK-8320372

@openjdk
Copy link

openjdk bot commented Dec 18, 2024

@shipilev
Adding additional issue to issue list: 8320372: test/jdk/sun/security/x509/DNSName/LeadingPeriod.java validity check failed.

@shipilev
Copy link
Member Author

Both backports are actually clean.

/clean

@openjdk
Copy link

openjdk bot commented Dec 18, 2024

@shipilev The /clean pull request command is not enabled for this repository

@shipilev
Copy link
Member Author

@shipilev The /clean pull request command is not enabled for this repository

:( Ok, then I need some reviews, please.

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

Looks good.

Just for my education: is it now common/recommended to bundle several downports into a single PR? From my memory (which might be outdated) we used dependent PRs for that purpose. The latter is obviously more complicated and work intensive so I'll probably follow your style in the future if that's OK?

@openjdk
Copy link

openjdk bot commented Jan 9, 2025

⚠️ @shipilev 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.

@shipilev
Copy link
Member Author

shipilev commented Jan 9, 2025

Looks good.

Thanks!

Just for my education: is it now common/recommended to bundle several downports into a single PR? From my memory (which might be outdated) we used dependent PRs for that purpose. The latter is obviously more complicated and work intensive so I'll probably follow your style in the future if that's OK?

I think we prefer multi-issue backports if we know there are breakages that are fixed by follow-up changes. This would introduce an atomic commit that would transit the repository from a good state to a good state, without exposing any known bad state in between. This is both cleaner and more convenient for eventual bisects.

@GoeLin
Copy link
Member

GoeLin commented Jan 9, 2025

Yes, I also combine changes with immediate fixes. Especially if one of them needs a review anyways, so it does not cause an unnecessary review.
Further it simplifies backports to later releases, as the change pushed to 21 can directly be backported.
Last, dependent pull request often don't resolve automatically, causing the dilemma to either push right on top, or to wait for the testing of the resolved change.

@shipilev
Copy link
Member Author

I finally figured out why regression test is not working: JDK-8347424 -- I think I'll wait for that and mix the fix here.

@shipilev
Copy link
Member Author

/issue add JDK-8347424

@openjdk
Copy link

openjdk bot commented Jan 16, 2025

@shipilev
Adding additional issue to issue list: 8347424: Fix and rewrite sun/security/x509/DNSName/LeadingPeriod.java test.

@shipilev
Copy link
Member Author

Thanks for reviews! I mixed in the test rewrite that fixes the regression test. Now I can confirm that retracting the product fix shows up as new regression test failure. Unfortunately, this invalidates prior reviews, please review again.

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

Still good! Thanks.

@shipilev
Copy link
Member Author

shipilev commented Jan 17, 2025

/approval 8311546 request Fixes the compatibility bug in certificate checking. Seen in the wild. The patch was in JDK 22 without product bugtail. The only problems are with the test, which requires additional followups, JDK-8320372, JDK-8347424. Applies cleanly, all tests pass, new test fails without a fix, passes with it. Risk is medium-low: touches certpath code, but the fix is simple and already shipping in existing JDKs.

/approval 8320372 request Fixes the test introduced by JDK-8311546. Applies cleanly, test passes. Risk is low: Test-only change, the patch was in JDK 22.

/approval 8347424 request Fixes the test introduced by JDK-8311546. Applies cleanly, test passes. Risk is medium-low: Test-only change, but only a recent one, so there might be follow-up test bugs later.

@openjdk
Copy link

openjdk bot commented Jan 17, 2025

@shipilev
8311546: The approval request has been created successfully.

@openjdk
Copy link

openjdk bot commented Jan 17, 2025

@shipilev
8320372: The approval request has been created successfully.

@openjdk
Copy link

openjdk bot commented Jan 17, 2025

@shipilev
8347424: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received ready Pull request is ready to be integrated labels Jan 17, 2025
@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Jan 18, 2025
@shipilev
Copy link
Member Author

Thanks for reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Jan 20, 2025

Going to push as commit 99a9299.
Since your change was applied there have been 84 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 Jan 20, 2025
@openjdk openjdk bot closed this Jan 20, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 20, 2025
@openjdk
Copy link

openjdk bot commented Jan 20, 2025

@shipilev Pushed as commit 99a9299.

💡 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