Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8326315

HttpClient.Builder.sslParameters() method should clarify which SSL parameters will be honoured

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      The HttpClient.Builder.sslParameters(SSLParameters) states:

      /**
               * Sets an {@code SSLParameters}.
               *
               * <p> If this method is not invoked prior to {@linkplain #build()
               * building}, then newly built clients will use a default,
               * implementation specific, set of parameters.
               *
               * <p> Some parameters which are used internally by the HTTP Client
               * implementation (such as the application protocol list) should not be
               * set by callers, as they may be ignored. The contents of the given
               * object are copied.
               *
               * @param sslParameters the SSLParameters
               * @return this builder
               */
              public Builder sslParameters(SSLParameters sslParameters);


      One part of that states:

      Some parameters which are used internally by the HTTP Client implementation (such as the application protocol list) should not be set by callers, as they may be ignored.

      However, the default implementation of the HttpClient ignores some other parameters too. Some intentionally (like the SNIServerName) and some unintentionally (like the namedGroups and signatureSchemes as noticed in https://github.com/openjdk/jdk/pull/17923#issuecomment-1953873607).

      The documentation of this sslParameters method can be updated to some more clarity on the usage of these parameters.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: