A trivial cherry-pick of the following fix from main-line: [JDK-8384815](https://bugs.openjdk.org/browse/JDK-8384815) SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate
--------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8384815: SelectOneKeyOutOfMany and PreferredKey fail after expired test certificate Changes: https://git.openjdk.org/valhalla/pull/2454/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2454&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8385009 Stats: 355 lines in 2 files changed: 124 ins; 155 del; 76 mod Patch: https://git.openjdk.org/valhalla/pull/2454.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2454/head:pull/2454 PR: https://git.openjdk.org/valhalla/pull/2454
