< prev index next >

src/java.base/share/classes/sun/security/ssl/Finished.java

Print this page

        

@@ -408,14 +408,10 @@
              */
             if (chc.conContext.secureRenegotiation) {
                 chc.conContext.clientVerifyData = fm.verifyData;
             }
 
-            if (chc.statelessResumption) {
-                chc.handshakeConsumers.put(
-                        SSLHandshake.NEW_SESSION_TICKET.id, SSLHandshake.NEW_SESSION_TICKET);
-            }
             // update the consumers and producers
             if (!chc.isResumption) {
                 chc.conContext.consumers.put(ContentType.CHANGE_CIPHER_SPEC.id,
                         ChangeCipherSpec.t10Consumer);
                 chc.handshakeConsumers.put(

@@ -443,14 +439,10 @@
             return null;
         }
 
         private byte[] onProduceFinished(ServerHandshakeContext shc,
                 HandshakeMessage message) throws IOException {
-            if (shc.statelessResumption) {
-                NewSessionTicket.handshake12Producer.produce(shc, message);
-            }
-
             // Refresh handshake hash
             shc.handshakeHash.update();
 
             FinishedMessage fm = new FinishedMessage(shc);
 

@@ -479,12 +471,11 @@
                         ChangeCipherSpec.t10Consumer);
                 shc.handshakeConsumers.put(
                         SSLHandshake.FINISHED.id, SSLHandshake.FINISHED);
                 shc.conContext.inputRecord.expectingFinishFlight();
             } else {
-                if (shc.handshakeSession.isRejoinable() &&
-                        !shc.statelessResumption) {
+                if (shc.handshakeSession.isRejoinable()) {
                     ((SSLSessionContextImpl)shc.sslContext.
                         engineGetServerSessionContext()).put(
                             shc.handshakeSession);
                 }
                 shc.conContext.conSession = shc.handshakeSession.finish();

@@ -598,12 +589,11 @@
             if (shc.conContext.secureRenegotiation) {
                 shc.conContext.clientVerifyData = fm.verifyData;
             }
 
             if (shc.isResumption) {
-                if (shc.handshakeSession.isRejoinable() &&
-                        !shc.statelessResumption) {
+                if (shc.handshakeSession.isRejoinable()) {
                     ((SSLSessionContextImpl)shc.sslContext.
                         engineGetServerSessionContext()).put(
                             shc.handshakeSession);
                 }
                 shc.conContext.conSession = shc.handshakeSession.finish();

@@ -923,13 +913,13 @@
                         chc.negotiatedProtocol);
             }
 
             // save the session
             if (!chc.isResumption && chc.handshakeSession.isRejoinable()) {
-                ((SSLSessionContextImpl)chc.sslContext.
-                        engineGetClientSessionContext()).
-                        put(chc.handshakeSession);
+                SSLSessionContextImpl sessionContext = (SSLSessionContextImpl)
+                chc.sslContext.engineGetClientSessionContext();
+                sessionContext.put(chc.handshakeSession);
             }
 
             // derive salt secret
             try {
                 SecretKey saltSecret = kd.deriveKey("TlsSaltSecret", null);

@@ -1036,15 +1026,14 @@
                 throw shc.conContext.fatal(Alert.INTERNAL_ERROR,
                         "Not supported key derivation: " +
                         shc.negotiatedProtocol);
             }
 
-            // Save the session if possible and not stateless
-            if (!shc.statelessResumption && !shc.isResumption &&
-                    shc.handshakeSession.isRejoinable()) {
+            // save the session
+            if (!shc.isResumption && shc.handshakeSession.isRejoinable()) {
                 SSLSessionContextImpl sessionContext = (SSLSessionContextImpl)
-                        shc.sslContext.engineGetServerSessionContext();
+                shc.sslContext.engineGetServerSessionContext();
                 sessionContext.put(shc.handshakeSession);
             }
 
             try {
                 // update the application traffic read keys.
< prev index next >