Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-05 09:21:33 +0300
committerAdam Langley <agl@google.com>2015-04-06 23:50:45 +0300
commit4a3f0732fd15ce3f38cb1f0879d3f8e64db888dd (patch)
tree59ff629b519d3b69310f23c81eb7b867651a419c /include/openssl/ssl3.h
parentd81e73dcbb497e0b3a2830881c09163af6fe7e21 (diff)
Tidy record length check.
Compression is gone, so don't allow for compression overhead. With that fixed, the second rr->length check in ssl3_get_record matches the length computation which sizes the read buffer. The first is wrong and doesn't account for the alignment padding. Move the second to the first. Change-Id: I3f4f05de9fdf5c645ff24493bbfdf303dcc1aa90 Reviewed-on: https://boringssl-review.googlesource.com/4236 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/ssl3.h')
-rw-r--r--include/openssl/ssl3.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/openssl/ssl3.h b/include/openssl/ssl3.h
index ab31a620..09705e15 100644
--- a/include/openssl/ssl3.h
+++ b/include/openssl/ssl3.h
@@ -256,11 +256,11 @@ OPENSSL_COMPILE_ASSERT(
SSL3_RT_MAX_ENCRYPTED_OVERHEAD >= SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD,
max_overheads_are_consistent);
+/* SSL3_RT_MAX_COMPRESSED_LENGTH is an alias for
+ * |SSL3_RT_MAX_PLAIN_LENGTH|. Compression is gone, so don't include the
+ * compression overhead. */
+#define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH
-/* If compression isn't used don't include the compression overhead */
-
-#define SSL3_RT_MAX_COMPRESSED_LENGTH \
- (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
#define SSL3_RT_MAX_ENCRYPTED_LENGTH \
(SSL3_RT_MAX_ENCRYPTED_OVERHEAD + SSL3_RT_MAX_COMPRESSED_LENGTH)
#define SSL3_RT_MAX_PACKET_SIZE \