summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-30 13:53:19 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-30 14:46:43 +0200
commit830419da7befb3d51cec3f0a41a547a5c00122af (patch)
tree48132b374e2c348bf29dfae7c69f9063c5a0b662
parentcf56cac045c2f694bf07ee07dd8462722d385ef5 (diff)
downloadgnutls-830419da7befb3d51cec3f0a41a547a5c00122af.tar.gz
disable default handshake timeout
It caused issues with non-blocking TLS clients and servers which may not want to block while the pull timeout function waits.
-rw-r--r--lib/gnutls_handshake.c13
-rw-r--r--lib/gnutls_state.c1
2 files changed, 0 insertions, 14 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 68648a4e96..c6857b9373 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2542,16 +2542,6 @@ int gnutls_handshake(gnutls_session_t session)
if (session->internals.priorities.protocol.algorithms == 0)
return gnutls_assert_val(GNUTLS_E_NO_PRIORITIES_WERE_SET);
- /* if no pull timeout has not been set, and a handshake timeout
- * is set, disable it */
- if (unlikely((session->internals.pull_timeout_func == NULL ||
- (session->internals.pull_timeout_func == gnutls_system_recv_timeout &&
- session->internals.pull_func != system_read)) &&
- session->internals.handshake_timeout_ms != 0)) {
- _gnutls_debug_log("Cannot enforce the handshake timeout; there is no pull_timeout function set.\n");
- session->internals.handshake_timeout_ms = 0;
- }
-
session->internals.handshake_in_progress = 1;
gettime(&session->internals.dtls.handshake_start_time);
if (session->internals.handshake_timeout_ms &&
@@ -2618,9 +2608,6 @@ int gnutls_handshake(gnutls_session_t session)
* default value. For the DTLS protocol, the more detailed
* gnutls_dtls_set_timeouts() is provided.
*
- * The TLS handshake process always has the default timeout value since
- * GnuTLS 3.4.0. To unset call this function with zero value.
- *
* Since: 3.1.0
**/
void
diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c
index 75f9587786..c1184dca35 100644
--- a/lib/gnutls_state.c
+++ b/lib/gnutls_state.c
@@ -394,7 +394,6 @@ int gnutls_init(gnutls_session_t * session, unsigned int flags)
(*session)->internals.dtls.retrans_timeout_ms = 1000;
(*session)->internals.dtls.total_timeout_ms = 60000;
} else {
- (*session)->internals.handshake_timeout_ms = DEFAULT_HANDSHAKE_TIMEOUT_MS;
(*session)->internals.transport = GNUTLS_STREAM;
}