6542796: CPU issue with JSSE and tomcat
authorxuelei
Sun, 16 Mar 2008 23:46:27 -0400
changeset 99 d70d3cc4dbe3
parent 98 4087c83cfab8
child 100 01ef29ca378f
6542796: CPU issue with JSSE and tomcat Summary: record length count error Reviewed-by: weijun
jdk/src/share/classes/sun/security/ssl/InputRecord.java
--- a/jdk/src/share/classes/sun/security/ssl/InputRecord.java	Sun Mar 16 01:37:44 2008 -0400
+++ b/jdk/src/share/classes/sun/security/ssl/InputRecord.java	Sun Mar 16 23:46:27 2008 -0400
@@ -426,11 +426,11 @@
             if (really < 0) {
                 throw new SSLException("SSL peer shut down incorrectly");
             }
+        }
 
-            // now we've got a complete record.
-            count = contentLen + headerSize;
-            exlen = 0;
-        }
+        // now we've got a complete record.
+        count = contentLen + headerSize;
+        exlen = 0;
 
         if (debug != null && Debug.isOn("record")) {
             if (count < 0 || count > (maxRecordSize - headerSize)) {
@@ -502,10 +502,11 @@
                 if (really < 0) {
                     throw new EOFException("SSL peer shut down incorrectly");
                 }
+            }
 
-                // now we've got a complete record.
-                exlen = 0;
-            }
+            // now we've got a complete record.
+            exlen = 0;
+
             hashInternal(buf, 2, 3);
             hashInternal(v2Buf, 0, len);
             V2toV3ClientHello(v2Buf);