summaryrefslogtreecommitdiff
path: root/lib/system_override.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2019-09-25 06:23:22 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2019-09-26 07:13:57 +0200
commitaf4e4edcc6443b6573e319234ecec1f27fb0179e (patch)
treeba402503a3b92f239caafba888fef1b4f47bee3a /lib/system_override.c
parenta17ffe208b7e3db74723836a472ce132c5d45aa3 (diff)
downloadgnutls-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/system_override.c')
-rw-r--r--lib/system_override.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/system_override.c b/lib/system_override.c
index f2fc5749d9..9179bf5c8a 100644
--- a/lib/system_override.c
+++ b/lib/system_override.c
@@ -106,15 +106,13 @@ gnutls_transport_set_pull_function(gnutls_session_t session,
* int (*gnutls_pull_timeout_func)(gnutls_transport_ptr_t, unsigned int ms);
*
* This callback is necessary when gnutls_handshake_set_timeout() or
- * gnutls_record_set_timeout() are set, and for calculating the DTLS mode
- * timeouts.
- *
- * In short, this callback should be set when a custom pull function is
- * registered. The callback will not be used when the session is in TLS mode with
- * non-blocking sockets. That is, when %GNUTLS_NONBLOCK is specified for a TLS
- * session in gnutls_init(). For compatibility with future GnuTLS versions
- * it is recommended to always set this function when a custom pull function
- * is registered.
+ * gnutls_record_set_timeout() are set, under TLS1.3 and for enforcing the DTLS
+ * mode timeouts when in blocking mode.
+ *
+ * For compatibility with future GnuTLS versions this callback must be set when
+ * a custom pull function is registered. The callback will not be used when the
+ * session is in TLS mode with non-blocking sockets. That is, when %GNUTLS_NONBLOCK
+ * is specified for a TLS session in gnutls_init().
*
* The helper function gnutls_system_recv_timeout() is provided to
* simplify writing callbacks.