diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-02-23 21:02:56 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-03-19 17:04:07 +0100 |
commit | 755196a8c14e435816b633a62158b4868f784338 (patch) | |
tree | b1582dd9171a0dcafa394bbef0863a485c44e92d /lib/gnutls_int.h | |
parent | b6c6e148b542a3ac3b0c407708fbc86e884d4f82 (diff) | |
download | gnutls-755196a8c14e435816b633a62158b4868f784338.tar.gz |
Improved estimation of wait in gnutls_session_get_data2tmp-improve-session-resumption
Previously we would wait an arbitrary value of 50ms for the
server to send session tickets. This change makes the client
wait for the estimated single trip time + 60 ms for the server
to calculate the session tickets. This improves the chance
to obtain tickets from internet servers during the call of
gnutls_session_get_data2().
Resolves: #706
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r-- | lib/gnutls_int.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index ccbcc5b558..d7a4235f9a 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -1306,8 +1306,12 @@ typedef struct { /* starting time of current handshake */ struct timespec handshake_start_time; - /* end time of current handshake */ - struct timespec handshake_endtime; + /* expected end time of current handshake (start+timeout); + * this is only filled if a handshake_time_ms is set. */ + struct timespec handshake_abs_timeout; + + /* An estimation of round-trip time under TLS1.3; populated in client side only */ + unsigned ertt; unsigned int handshake_timeout_ms; /* timeout in milliseconds */ unsigned int record_timeout_ms; /* timeout in milliseconds */ |