[gnutls-devel] GnuTLS | Fix issues in record_size_limit extension handling (!879)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Thu Feb 7 15:57:25 CET 2019


Daiki Ueno commented on a discussion on lib/ext/max_record.c:

>  	} 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);

There _was_ [a test](https://gitlab.com/gnutls/gnutls/blob/master/tests/tls-record-size-limit.c#L319) but it didn't fail due to [a mishandling](https://gitlab.com/gnutls/gnutls/blob/master/lib/hello_ext.h#L162) of "max_fragment_length" sent by the client, where `id == 0`.  I'm fixing this.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/879#note_139212580
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/20190207/a7b7cbe2/attachment-0001.html>


More information about the Gnutls-devel mailing list