[gnutls-devel] GnuTLS | TLS 1.3: ignore "early_data" extension (!706)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Jul 25 16:55:42 CEST 2018


Nikos Mavrogiannopoulos started a new discussion on lib/record.c:

>  				  "Discarded message[%u] due to invalid decryption\n",
>  				  (unsigned int)
>  				  _gnutls_uint64touint32(packet_sequence));
> +
> +		/* as 0-RTT is not implemented yet, when early data is
> +		 * indicated, skip decryption failure up to
> +		 * max_early_data_size. */
> +		if (session->internals.early_data_indicated &&
> +		    record.type == GNUTLS_APPLICATION_DATA) {
> +			if (record.length > session->security_parameters.max_early_data_size - session->internals.early_data_received) {

Is `early_data_received` always smaller to `max_early_data_size`? I'm thinking that since the types are all uint32_t, maybe it is safer to use addition instead. E.g., instead of `uint16_t` > `uint32_t` - `uint32_t` have:
```
uint32_t + uint16_t > uint32_t
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/706#note_90325507
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/20180725/1aefef9c/attachment-0001.html>


More information about the Gnutls-devel mailing list