RFR: 8372661: Add a null-safe static factory method to "jdk.test.lib.net.SimpleSSLContext"

Volkan Yazici vyazici at openjdk.org
Thu Dec 11 12:25:21 UTC 2025


Overhauls `SimpleSSLContext` to remove the need for null checks at the call site, and to accept a key store file search path, which removes the need to copy-paste `SimpleSSLContext` just to change the search path.

### Tips for reviewers

1. Start from `SimpleSSLContext.java`
2. See how `test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java` is renamed to `test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContextWhiteboxAdapter.java` and how `@compile/module=java.net.http .../SimpleSSLContext.java` JTreg tag is used to inject `SimpleSSLContext`

-------------

Commit messages:
 - Overhaul `SimpleSSLContext` and its usages

Changes: https://git.openjdk.org/jdk/pull/28765/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28765&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8372661
  Stats: 1131 lines in 205 files changed: 83 ins; 712 del; 336 mod
  Patch: https://git.openjdk.org/jdk/pull/28765.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28765/head:pull/28765

PR: https://git.openjdk.org/jdk/pull/28765


More information about the security-dev mailing list