Skip to content

8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate#2909

Closed
sendaoYan wants to merge 3 commits into
openjdk:masterfrom
sendaoYan:jbs8384815
Closed

8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate#2909
sendaoYan wants to merge 3 commits into
openjdk:masterfrom
sendaoYan:jbs8384815

Conversation

@sendaoYan

@sendaoYan sendaoYan commented May 20, 2026

Copy link
Copy Markdown
Member

Hi all,

This is backport PR to make test generate certificates during test run which avoid the fixed certificate expired cause test fails.
There are two changes make this PR backported uncleanly.

  1. Additional throws NoSuchAlgorithmException for createSelfSignedCertmathod. This avoid javac report build failure by jdk21u.
  2. Since lack of JDK-8317431 in jdk21u, calling additional .addSubjectKeyIdExt(caKeys.getPublic()) in CertificateBuilder.newCertificateBuilder() ensures:
    2.1. The certificate is encoded as v3 (version field is written when extensions are present).
    2.2 The extensions block contains a valid extension instead of an illegal empty wrapper on a v1 certificate.

Change has been verified locally by run the releated on linux-x64. Test-fix only, no risk.



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-8384815 needs maintainer approval

Issue

  • JDK-8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate (Bug - P2 - Approved)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2909

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented May 20, 2026

Copy link
Copy Markdown

👋 Welcome back syan! 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

openjdk Bot commented May 20, 2026

Copy link
Copy Markdown

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

8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate

Reviewed-by: goetz

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 1fcd11f41d1b50fb14e38fafefa492a31b166863 8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate May 20, 2026
@openjdk

openjdk Bot commented May 20, 2026

Copy link
Copy Markdown

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 May 20, 2026
@mlbridge

mlbridge Bot commented May 20, 2026

Copy link
Copy Markdown

Webrevs

@GoeLin GoeLin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for fixing!

@openjdk

openjdk Bot commented May 21, 2026

Copy link
Copy Markdown

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

@sendaoYan

Copy link
Copy Markdown
Member Author

Thanks for the reviews @GoeLin

/approval request Backport to make test generate certificates during test run which avoid the fix certificate expired cause test fails. Change has been verified locally by run the releated on linux-x64. Test-fix only, no risk.

@openjdk

openjdk Bot commented May 21, 2026

Copy link
Copy Markdown

@sendaoYan
8384815: 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 and removed approval Requires approval; will be removed when approval is received labels May 21, 2026
@GoeLin

GoeLin commented May 21, 2026

Copy link
Copy Markdown
Member

Hi @sendaoYan
thanks for fixing this.
If you don't mind I'll do the 17u backport: openjdk/jdk17u-dev#4475

@GoeLin

GoeLin commented May 21, 2026

Copy link
Copy Markdown
Member

Hi @sendaoYan
you might want to integrate. I'm deferring yesterdays tag in jdk21u until this is pushed to get this included.

@sendaoYan

Copy link
Copy Markdown
Member Author

Thanks for the reviews and approved @GoeLin.

/integrate

@openjdk

openjdk Bot commented May 21, 2026

Copy link
Copy Markdown

Going to push as commit 228ab6e.

@openjdk openjdk Bot added the integrated Pull request has been integrated label May 21, 2026
@openjdk openjdk Bot closed this May 21, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 21, 2026
@openjdk

openjdk Bot commented May 21, 2026

Copy link
Copy Markdown

@sendaoYan Pushed as commit 228ab6e.

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

@GoeLin

GoeLin commented May 21, 2026

Copy link
Copy Markdown
Member

Thanks!!

@sendaoYan sendaoYan deleted the jbs8384815 branch May 21, 2026 08:08
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.

2 participants