7166487: checkSequenceNumber method never called within readRecord of SSLEngineImpl

Reviewed-by: weijun
This commit is contained in:
Xue-Lei Andrew Fan 2012-06-19 17:28:06 -07:00
parent c0679a0902
commit 563f4546ff

View File

@ -1119,6 +1119,7 @@ final public class SSLEngineImpl extends SSLEngine {
* handle a few more records, so the sequence number * handle a few more records, so the sequence number
* of the last record cannot be wrapped. * of the last record cannot be wrapped.
*/ */
hsStatus = getHSStatus(hsStatus);
if (connectionState < cs_ERROR && !isInboundDone() && if (connectionState < cs_ERROR && !isInboundDone() &&
(hsStatus == HandshakeStatus.NOT_HANDSHAKING)) { (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
if (checkSequenceNumber(readMAC, if (checkSequenceNumber(readMAC,
@ -1287,6 +1288,7 @@ final public class SSLEngineImpl extends SSLEngine {
* handle a few more records, so the sequence number * handle a few more records, so the sequence number
* of the last record cannot be wrapped. * of the last record cannot be wrapped.
*/ */
hsStatus = getHSStatus(hsStatus);
if (connectionState < cs_ERROR && !isOutboundDone() && if (connectionState < cs_ERROR && !isOutboundDone() &&
(hsStatus == HandshakeStatus.NOT_HANDSHAKING)) { (hsStatus == HandshakeStatus.NOT_HANDSHAKING)) {
if (checkSequenceNumber(writeMAC, eor.contentType())) { if (checkSequenceNumber(writeMAC, eor.contentType())) {