[gnutls-devel] GnuTLS | add support for 0-RTT (!775)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Mon Oct 29 13:51:19 CET 2018


Nikos Mavrogiannopoulos started a new discussion on lib/handshake-tls13.c:

>  	case STATE101:
> -		ret =
> -		    generate_and_set_hs_traffic_keys(session);
> +		/* Note that we check IN_FLIGHT, not ACCEPTED
> +		 * here. This is because the client sends early data
> +		 * speculatively. */
> +		if (session->internals.hsk_flags & HSK_EARLY_DATA_IN_FLIGHT) {
> +			ret = _tls13_write_connection_state_init(session, STAGE_EARLY);
> +			if (ret == 0) {
> +				_gnutls_epoch_bump(session);
> +				ret = _gnutls_epoch_dup(session, EPOCH_WRITE_CURRENT);
> +			}
> +		}
>  		STATE = STATE101;
> -		IMED_RET_FATAL("generate session keys", ret, 0);
> +		IMED_RET_FATAL("set early traffic keys", ret, 0);

should these two lines enter the if block? `ret` will have a value set to zero, so it works, but it feels like easy for a change to break this part.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/775#note_112778628
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/20181029/d6b771b7/attachment.html>


More information about the Gnutls-devel mailing list