changeset 76:73f50a1c8634

6542796: CPU issue with JSSE and tomcat Summary: record length count error Reviewed-by: weijun
author xuelei
date Sun, 16 Mar 2008 23:46:27 -0400
parents d69e411f0711
children 280a7b75cd39
files src/share/classes/sun/security/ssl/InputRecord.java
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/InputRecord.java	Sun Mar 16 01:37:44 2008 -0400
+++ b/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);