diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-09-25 06:23:22 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2019-09-26 07:13:57 +0200 |
commit | af4e4edcc6443b6573e319234ecec1f27fb0179e (patch) | |
tree | ba402503a3b92f239caafba888fef1b4f47bee3a /lib/buffers.h | |
parent | a17ffe208b7e3db74723836a472ce132c5d45aa3 (diff) | |
download | gnutls-af4e4edcc6443b6573e319234ecec1f27fb0179e.tar.gz |
gnutls_session_get_data2: fix operation without a timeout callback
When TLS1.3 was introduced, gnutls_session_get_data2 was modified
to assume that the callbacks set included the timeout one which was
not previously necessary except for some special cases. This corrects
that issue and makes sure that gnutls_session_get_data2() does not
fail (but not necessarily succeed), if that timeout callback is not
set.
Resolves: #823
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/buffers.h')
-rw-r--r-- | lib/buffers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/buffers.h b/lib/buffers.h index 7b76423c4b..7f30b0ade1 100644 --- a/lib/buffers.h +++ b/lib/buffers.h @@ -37,6 +37,9 @@ inline static int _gnutls_record_buffer_get_size(gnutls_session_t session) return session->internals.record_buffer.byte_length; } +#define NO_TIMEOUT_FUNC_SET(session) unlikely(session->internals.pull_timeout_func == gnutls_system_recv_timeout \ + && session->internals.pull_func != system_read) + /*- * record_check_unprocessed: * @session: is a #gnutls_session_t structure. |