Skip to content

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

Open
judovana wants to merge 3 commits into
openjdk:masterfrom
judovana:8384815on8325766
Open

8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate#832
judovana wants to merge 3 commits into
openjdk:masterfrom
judovana:8384815on8325766

Conversation

@judovana

@judovana judovana commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This is backport of openjdk/jdk17u-dev#4475 where the changes against it were inspired by openjdk/jdk11u-dev#3203:

+ * @library ../../../../java/security/testlibrary/
+ * @library /test/lib
+ * @build CertificateBuilder
+ * @run main PreferredKey

and

-                         new SecureRandom().nextLong(1000000) + 1))
+                        (long) (new SecureRandom().nextDouble() * 1000000) + 1))

and

-                                 null)).toList().contains(DSA_ALIAS),
+                                null)).anyMatch(DSA_ALIAS::equals),

This is on top of #829 and currently includes it. The #829 commit will be removed from this PR once #829 is in .

make  test TEST="jdk_security"
...
Passed: sun/security/ssl/X509KeyManager/PreferredKey.java
...
Passed: sun/security/ssl/X509KeyManager/SelectOneKeyOutOfMany.java
...
Summary: jdk_security
FAILED: java/security/KeyStore/PKCS12/StoreTrustedCertAPITest.java
FAILED: sun/security/pkcs11/KeyStore/SecretKeysBasic.sh
FAILED: sun/security/pkcs11/Provider/Login.sh
FAILED: sun/security/pkcs11/Signature/TestDSAKeyLength.java
FAILED: sun/security/ssl/Stapling/StatusResponseManager.sh
FAILED: sun/security/tools/keytool/autotest.sh
TEST STATS: name=jdk_security  run=1128  pass=1122  fail=6

Where both:

git diff  |grep +++
+++ b/jdk/test/sun/security/ssl/X509KeyManager/PreferredKey.java
+++ b/jdk/test/sun/security/ssl/X509KeyManager/SelectOneKeyOutOfMany.java

Were failing before.



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)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 832

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 11, 2026

Copy link
Copy Markdown

👋 Welcome back jvanek! 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 Jun 11, 2026

Copy link
Copy Markdown

❗ 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 1fcd11f41d1b50fb14e38fafefa492a31b166863 8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate Jun 11, 2026
@openjdk

openjdk Bot commented Jun 11, 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 Jun 11, 2026
@mlbridge

mlbridge Bot commented Jun 11, 2026

Copy link
Copy Markdown

Webrevs

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