7166487: checkSequenceNumber method never called within readRecord of SSLEngineImpl
authorxuelei
Tue, 19 Jun 2012 17:28:06 -0700
changeset 13031 a410394dc617
parent 13030 d4cdee9d5740
child 13032 9f6734b09d79
7166487: checkSequenceNumber method never called within readRecord of SSLEngineImpl Reviewed-by: weijun
jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java
--- a/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Jun 19 10:20:45 2012 +0100
+++ b/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Jun 19 17:28:06 2012 -0700
@@ -1119,6 +1119,7 @@
                  * handle a few more records, so the sequence number
                  * of the last record cannot be wrapped.
                  */
+                hsStatus = getHSStatus(hsStatus);
                 if (connectionState < cs_ERROR && !isInboundDone() &&
                         (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
                     if (checkSequenceNumber(readMAC,
@@ -1287,6 +1288,7 @@
          * handle a few more records, so the sequence number
          * of the last record cannot be wrapped.
          */
+        hsStatus = getHSStatus(hsStatus);
         if (connectionState < cs_ERROR && !isOutboundDone() &&
                 (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
             if (checkSequenceNumber(writeMAC, eor.contentType())) {