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

Java 11 change in closeOutbound() behavior for unused SSLEngine

XMLWordPrintable

      SSLContext sslContext = SSLContext.getDefault();
      SSLEngine sslEngine = sslContext.createSSLEngine();
      sslEngine.closeOutbound();
      SSLEngineResult.HandshakeStatus hsStatus = sslEngine.getHandshakeStatus();
      System.err.println("hsStatus = " + hsStatus);

      This prints "NOT_HANDSHAKING" in Java 8 and "NEED_UNWRAP" in JDK 11+.

      Refer to discussion in the mailing list:
      https://mail.openjdk.java.net/pipermail/security-dev/2019-October/020789.html

            wetmore Bradford Wetmore
            sbordet Simone Bordet
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: