[gnutls-devel] GnuTLS | Improved estimation of wait in gnutls_session_get_data2 (!936)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Mar 19 15:36:50 CET 2019




Hubert Kario commented on a discussion on lib/session.c:

>  	}
>  
>  	if (vers->tls13_sem && !(session->internals.hsk_flags & HSK_TICKET_RECEIVED)) {
> -		/* wait for a message with timeout of 1ms */
> -		ret = _gnutls_recv_in_buffers(session, GNUTLS_APPLICATION_DATA, -1, 50);
> +		unsigned ertt = session->internals.ertt;
> +		/* use our estimation of round-trip + some time for the server to calculate
> +		 * the value(s). */
> +		ertt += 100;

I'd say that anything in double-digit range is too long...

in general, I don't like the idea of sleeping to wait for something to happen - that feels to me like a hack

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/936#note_152035734
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/20190319/f766f7b9/attachment.html>


More information about the Gnutls-devel mailing list