[gnutls-devel] GnuTLS | Fix issues in record_size_limit extension handling (!879)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Fri Feb 8 16:09:47 CET 2019
Daiki Ueno commented on a discussion on lib/gnutls_int.h:
> {
> size_t max;
>
> - if (IS_DTLS(session)) {
> - max = MIN(gnutls_dtls_get_data_mtu(session), session->security_parameters.max_record_send_size);
> - } else {
> - max = session->security_parameters.max_record_send_size;
> - }
> + max = MIN(session->security_parameters.max_record_send_size,
> + session->security_parameters.max_record_recv_size);
`max_record_recv_size` is documented as:
```
/* The send size is the one requested by the programmer.
* The recv size is the one negotiated with the peer.
*/
uint16_t max_record_send_size;
uint16_t max_record_recv_size;
```
That means both `max_record_send_size` and `max_record_recv_size` should be used for calculating the maximum user data (i.e. plaintext without content type) to be sent.
I will add doc string there.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/879#note_139606408
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190208/ee724e0b/attachment-0001.html>
More information about the Gnutls-devel
mailing list