[gnutls-help] gnutls_heartbeat_ping data_size parameter documentation

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Jan 26 14:47:43 CET 2017


On Wed, Jan 25, 2017 at 5:56 PM, Olivier Soldano
<olivier.soldano at savoirfairelinux.com> wrote:
> Hello Nikos,
>
> Thanks for your answer, first let me apologize for the typos,
> yes I meant DEFAULT_PADDING_SIZE and the effective packet size is 484 with a specified data size of 444.
>
> The output of gnutls_record_overhead_size is 37 which is off by 3.
> However 37 seams to be correct as the sessions sends DTLS packets (DTLS_RECORD_HEADER_SIZE = 13) and is cyphered using AES-256-GCM
> with AEAD MAC (24 bytes of overhead) which is indeed 37 bytes.
> Maybe it is linked to : response = gnutls_malloc(1 + 2 + data_size + DEFAULT_PADDING_SIZE) in heartbeat_send_data ?

Right these are a header to the payload. So the number of data
transmitted by this function should be:
MAX(16, payload_size)+gnutls_record_overhead_size()+3.

I'll document that in gnutls_heartbeat_ping().

regards,
Nikos



More information about the Gnutls-help mailing list