summaryrefslogtreecommitdiff
path: root/lib/ext/max_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext/max_record.c')
-rw-r--r--lib/ext/max_record.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ext/max_record.c b/lib/ext/max_record.c
index 2a7a9d3496..17c06e483f 100644
--- a/lib/ext/max_record.c
+++ b/lib/ext/max_record.c
@@ -153,16 +153,16 @@ _gnutls_max_record_send_params(gnutls_session_t session,
} else { /* server side */
+ if (session->internals.hsk_flags & HSK_RECORD_SIZE_LIMIT_SENT)
+ return 0;
+
if (session->security_parameters.max_record_recv_size !=
DEFAULT_MAX_RECORD_SIZE) {
ret = _gnutls_mre_record2num
(session->security_parameters.
max_record_recv_size);
-
- /* it's not an error, as long as we send the
- * record_size_limit extension with that value */
if (ret < 0)
- return 0;
+ return gnutls_assert_val(ret);
p = (uint8_t) ret;
ret = _gnutls_buffer_append_data(extdata, &p, 1);