summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-07-14 11:30:51 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-08-11 08:18:07 +0200
commit0b572406fa500a57c3e0a4abb74ef6ff0dca91fd (patch)
tree307ffe8ae694a91daee01101f9ae2a58c8e1f816 /doc
parent720b255c3691458bf7836f424add0c3886f5b0dd (diff)
downloadgnutls-0b572406fa500a57c3e0a4abb74ef6ff0dca91fd.tar.gz
extensions: simplified requirements from send callback
The callback no longer needs to return the number of sent data; they are now calculated by the caller. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/cha-internals.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/cha-internals.texi b/doc/cha-internals.texi
index d368054712..532057d51a 100644
--- a/doc/cha-internals.texi
+++ b/doc/cha-internals.texi
@@ -246,7 +246,13 @@ The @funcintref{_foobar_recv_params} function is responsible for
parsing incoming extension data (both in the client and server).
The @funcintref{_foobar_send_params} function is responsible for
-sending extension data (both in the client and server).
+sending extension data (both in the client and server). It should
+append data to provided buffer and return a positive (or zero) number on
+success or a negative error code. Previous to 3.6.0 versions of GnuTLS required
+that function to return the number of bytes that were written. If zero
+is returned and no bytes are appended the extension will not be sent.
+If a zero byte extension is to be sent this function must return
+@code{GNUTLS_E_INT_RET_0}.
If you receive length fields that don't match, return
@code{GNUTLS_E_@-UNEXPECTED_@-PACKET_@-LENGTH}. If you receive invalid