summaryrefslogtreecommitdiff
path: root/lib/constate.c
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2019-01-24 15:03:30 +0000
committerDaiki Ueno <ueno@gnu.org>2019-01-24 15:03:30 +0000
commite7af375a1222694514be1999463493354fd6361f (patch)
treeffc63984c39f71c554eeb13d4110a66aa1e78565 /lib/constate.c
parentcd73edf45d98b84c44a43d840de68f48e2e0a160 (diff)
parent0f567dc5b839a7506df4243da9fb0ed80819a505 (diff)
downloadgnutls-e7af375a1222694514be1999463493354fd6361f.tar.gz
Merge branch 'tmp-record-size-limit-fixes' into 'master'
Fix record_size_limit extension handling when resuming See merge request gnutls/gnutls!886
Diffstat (limited to 'lib/constate.c')
-rw-r--r--lib/constate.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/constate.c b/lib/constate.c
index 11fedab533..fbbff886e9 100644
--- a/lib/constate.c
+++ b/lib/constate.c
@@ -738,8 +738,6 @@ int _gnutls_epoch_set_keys(gnutls_session_t session, uint16_t epoch, hs_stage_t
memcpy(dst->server_random, src->server_random, GNUTLS_RANDOM_SIZE); \
dst->ext_master_secret = src->ext_master_secret; \
dst->etm = src->etm; \
- dst->max_record_recv_size = src->max_record_recv_size; \
- dst->max_record_send_size = src->max_record_send_size; \
dst->prf = src->prf; \
dst->grp = src->grp; \
dst->pversion = src->pversion; \
@@ -757,8 +755,15 @@ void _gnutls_set_resumed_parameters(gnutls_session_t session)
security_parameters_st *src =
&session->internals.resumed_security_parameters;
security_parameters_st *dst = &session->security_parameters;
+ const version_entry_st *ver = get_version(session);
+
+ CPY_COMMON(ver->tls13_sem);
- CPY_COMMON(get_version(session)->tls13_sem);
+ if (!ver->tls13_sem &&
+ !(session->internals.hsk_flags & HSK_RECORD_SIZE_LIMIT_NEGOTIATED)) {
+ dst->max_record_recv_size = src->max_record_recv_size;
+ dst->max_record_send_size = src->max_record_send_size;
+ }
}
/* Sets the current connection session to conform with the