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

SSLSocket should throw an exception when configuring DTLS

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 12
    • security-libs
    • None
    • behavioral
    • minimal
    • Hide
      The exception is a behavior change, so there is a chance a developer is using something in an unsupported manner. Internally in the implementation, the SSLContext methods, like getParameters(), now uses SSLEngine instead of SSLSocket to provide setup details.
      Show
      The exception is a behavior change, so there is a chance a developer is using something in an unsupported manner. Internally in the implementation, the SSLContext methods, like getParameters(), now uses SSLEngine instead of SSLSocket to provide setup details.
    • Java API
    • Implementation

      Summary

      DTLS has only been supported by SSLEngine in the SunJSSE provider (the SunJSSE provider) . When using DTLS, the JDK JSSE implementation should throw an exception when using SSLContext.getSocketFactory() and SSLContext.getServerSocketFactory(). There is no change to the JDK API specification.

      Problem

      A recent JCK 11 test run showed after the TLS 1.3 putback that the JDK JSSE implementation had previously allow more DTLS operations by SSLSocket than expected. The code changes in 1.3 were in the right direction, but they need to go a step further in denying a socket factory creation. The SunJSSE provider's DTLS implementation has never been supported this in prior releases.

      Solution

      A change in behavior to throw an UnsupportedOperationException from the JDK JSSE implementation of SSLContext.getServerSocketFactory() or SSLContext.getSocketFactory() if the SSLContext object is for DTLS algorithms. Each method already supports the throwing of this exception. In the case were the default SSLContext has been set to DTLS and SSL[Server]SocketFactory().getDefault() is called, the pre-existing documented failure value is returned, an inoperative factory.

      Specification

      When the context uses DTLS: SSLContext.getServerSocketFactory() or SSLContext.getSocketFactory() returns UnsupportedOperationException SSL[Server]SocketFactory().getDefault() returns a inoperative factory

            ascarpino Anthony Scarpino
            ascarpino Anthony Scarpino
            Xuelei Fan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: