Use SSL3_HM_HEADER_LENGTH a bit more.
Somewhat clearer what it's for than just 4.
Change-Id: Ie7bb89ccdce188d61741da203acd624b49b69058
Reviewed-on: https://boringssl-review.googlesource.com/8986
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/s3_both.c b/ssl/s3_both.c
index cb4356b..b0641e5 100644
--- a/ssl/s3_both.c
+++ b/ssl/s3_both.c
@@ -552,7 +552,7 @@
}
/* Read the message header, if we haven't yet. */
- int ret = extend_handshake_buffer(ssl, 4);
+ int ret = extend_handshake_buffer(ssl, SSL3_HM_HEADER_LENGTH);
if (ret <= 0) {
return ret;
}
@@ -568,7 +568,7 @@
}
/* Read the message body, if we haven't yet. */
- ret = extend_handshake_buffer(ssl, 4 + msg_len);
+ ret = extend_handshake_buffer(ssl, SSL3_HM_HEADER_LENGTH + msg_len);
if (ret <= 0) {
return ret;
}
@@ -579,8 +579,8 @@
ssl->init_buf->data, ssl->init_buf->length);
ssl->s3->tmp.message_type = ((const uint8_t *)ssl->init_buf->data)[0];
- ssl->init_msg = (uint8_t*)ssl->init_buf->data + 4;
- ssl->init_num = ssl->init_buf->length - 4;
+ ssl->init_msg = (uint8_t*)ssl->init_buf->data + SSL3_HM_HEADER_LENGTH;
+ ssl->init_num = ssl->init_buf->length - SSL3_HM_HEADER_LENGTH;
/* Ignore stray HelloRequest messages. Per RFC 5246, section 7.4.1.1, the
* server may send HelloRequest at any time. */