From: Nikos Mavrogiannopoulos Date: Thu, 26 Jan 2017 13:49:33 +0000 (+0100) Subject: heartbeat extension: doc update X-Git-Tag: gnutls_3_6_0~1030 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9898be81d83d0675813706a041a4e05af7990aa6;p=thirdparty%2Fgnutls.git heartbeat extension: doc update Document how to calculate the total TLS data transmitted. Signed-off-by: Nikos Mavrogiannopoulos --- diff --git a/lib/ext/heartbeat.c b/lib/ext/heartbeat.c index 26a0928d9c..a1b6893fae 100644 --- a/lib/ext/heartbeat.c +++ b/lib/ext/heartbeat.c @@ -22,8 +22,6 @@ */ /* This file implements the TLS heartbeat extension. - * It was originally implemented during Google SoC 2012 by by Olga Smolenchuk, - * and later rewritten by Nikos Mavrogiannopoulos. */ #include "errors.h" @@ -151,6 +149,9 @@ heartbeat_send_data(gnutls_session_t session, const void *data, * flag %GNUTLS_HEARTBEAT_WAIT, or you need to handle retransmissions * and timeouts manually. * + * The total TLS data transmitted as part of the ping message are given by + * the following formula: MAX(16, @data_size)+gnutls_record_overhead_size()+3. + * * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 3.1.2