diff options
author | David Benjamin <davidben@chromium.org> | 2015-04-26 22:35:35 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-07 01:14:07 +0300 |
commit | 1d0a194cc151ac6cf2c85e393bb48ff22448cf15 (patch) | |
tree | bb07acb564d41996251024d9ecd25df569f01d54 /ssl/d1_both.c | |
parent | da881e9a15f673e862eeeb30c3112aa88c747ede (diff) |
Promote max_cert_list and max_send_fragment to functions.
Also size them based on the limits in the quantities they control (after
checking bounds at the API boundary).
BUG=404754
Change-Id: Id56ba45465a473a1a793244904310ef747f29b63
Reviewed-on: https://boringssl-review.googlesource.com/4559
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 6ce508fa..662f518f 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -470,8 +470,8 @@ static hm_fragment *dtls1_get_buffered_message( * be greater if the maximum certificate list size requires it. */ static size_t dtls1_max_handshake_message_len(const SSL *s) { size_t max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH; - if (max_len < (size_t)s->max_cert_list) { - return (size_t)s->max_cert_list; + if (max_len < s->max_cert_list) { + return s->max_cert_list; } return max_len; } |