summaryrefslogtreecommitdiff
path: root/lib/gnutls_handshake.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-01-21 09:44:38 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-01-21 09:44:38 +0100
commit925e23875bb3b3c1ff8b287cc213982a5ff75e13 (patch)
tree6feb41c5c8b5196bc2a7aa88d3e3994508f598e0 /lib/gnutls_handshake.c
parent45e05bc8f73aa8de164c8752031d86ce3816acc9 (diff)
downloadgnutls-925e23875bb3b3c1ff8b287cc213982a5ff75e13.tar.gz
Added documentation of rehandshake usage in gnutls if full-duplex capability is required.
Diffstat (limited to 'lib/gnutls_handshake.c')
-rw-r--r--lib/gnutls_handshake.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index b4e81649bb..618b20c506 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -1257,7 +1257,6 @@ _gnutls_recv_handshake_header (gnutls_session_t session,
if (ret < 0)
{
- gnutls_assert ();
return ret;
}
@@ -2520,6 +2519,13 @@ _gnutls_recv_hello (gnutls_session_t session, opaque * data, int datalen)
* gnutls_handshake() function in order to negotiate the new
* parameters.
*
+ * Since TLS is full duplex some application data might have been
+ * sent during peer's processing of this message. In that case
+ * one should call gnutls_record_recv() until GNUTLS_E_REHANDSHAKE
+ * is returned to clear any pending data. Care must be taken if
+ * rehandshake is mandatory to terminate if it does not start after
+ * some threshold.
+ *
* If the client does not wish to renegotiate parameters he will
* should with an alert message, thus the return code will be
* %GNUTLS_E_WARNING_ALERT_RECEIVED and the alert will be