src/java.base/share/classes/sun/security/ssl/HandshakeContext.java
branchJDK-8145252-TLS13-branch
changeset 56660 66c803c3ce32
parent 56561 5f23e0400f27
child 56702 75527e40bdfd
--- a/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java	Sat Jun 02 07:50:25 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java	Sat Jun 02 21:23:02 2018 -0700
@@ -356,7 +356,8 @@
     /**
      * Parse the handshake record and return the contentType
      */
-    static byte getHandshakeType(TransportContext conContext, Plaintext plaintext) throws IOException {
+    static byte getHandshakeType(TransportContext conContext,
+            Plaintext plaintext) throws IOException {
         //     struct {
         //         HandshakeType msg_type;    /* handshake type */
         //         uint24 length;             /* bytes in message */
@@ -392,10 +393,12 @@
     }
 
     void dispatch(byte handshakeType, Plaintext plaintext) throws IOException {
-
         if (conContext.transport.useDelegatedTask()) {
             boolean hasDelegated = !delegatedActions.isEmpty();
-            if (hasDelegated || handshakeType != SSLHandshake.FINISHED.id) {
+            if (hasDelegated ||
+                   (handshakeType != SSLHandshake.FINISHED.id &&
+                    handshakeType != SSLHandshake.KEY_UPDATE.id &&
+                    handshakeType != SSLHandshake.NEW_SESSION_TICKET.id)) {
                 if (!hasDelegated) {
                     taskDelegated = false;
                     delegatedThrown = null;