6542796: CPU issue with JSSE and tomcat
Summary: record length count error
Reviewed-by: weijun
--- 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);