RFR: 8326381: com.sun.net.httpserver.HttpsParameters and SSLStreams incorrectly handle needClientAuth and wantClientAuth [v3]

Jaikiran Pai jpai at openjdk.org
Thu Feb 22 15:23:13 UTC 2024


> Can I please get a review of this change which proposes to fix https://bugs.openjdk.org/browse/JDK-8326381?
> 
> As noted in the JBS issue, the implementation in `setNeedClientAuth()` and `setWantClientAuth()` of `com.sun.net.httpserver.HttpsParameters` wasn't matching the API specification. The commit in this PR fixes that issue and it now matches the API specification as well as what is done in `javax.net.ssl.SSLParameters` class.
> 
> Additionally, as noted in the JBS issue, the (internal class) `sun.net.httpserver.SSLStreams` had a bug where it could end up resetting the `needClientAuth` flag on the `SSLEngine` because of the way the `setNeedClientAuth()` and `setWantClientAuth()` methods were being called on the `SSLEngine`. This too has been fixed in this PR.
> 
> A new jtreg test has been introduced to reproduce the issue in the `HttpsParameters` class and verify this fix.

Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:

 - introduce a test to verify the server honours needClientAuth and wantClientAuth when set through HttpsParameters
 - deprecate the SSL parameters related methods on HttpsParameter

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17940/files
  - new: https://git.openjdk.org/jdk/pull/17940/files/ff404ee1..03f04c78

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17940&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17940&range=01-02

  Stats: 333 lines in 4 files changed: 326 ins; 2 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/17940.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17940/head:pull/17940

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


More information about the net-dev mailing list