[gnutls-help] gnutls_heartbeat_ping data_size parameter documentation

Olivier Soldano olivier.soldano at savoirfairelinux.com
Tue Jan 24 16:17:52 CET 2017


Hello,
I am currently having some trouble with the documentation of gnutls_heartbeat_ping.
It is said that : size_t data_size
                   is the length of the ping payload.

I thought it meant the effective size of the Heartbeat packet generated,
but my numbers are off. a little example:

 - I specify a data_size of 444 bytes, 
 - I end up with an encrypted message of 471 bytes and a TLS packet of 489 bytes.

which after analysis ought to be the TLS header size and the MAC + padding in the
encryption algorithm used.

I don't understand where is my error, as i thought that the tls header size 
was covered by DEFAULT_PAYLOAD_SIZE in heartbeat_send_data. I think this is a mixed signal between
the documentation and implementation.
If these numbers are to be taken into account, I think that the documentation should states so.

If anybody has piece of advice on the subject, I would be more than content to hear it!

Olivier Soldano



More information about the Gnutls-help mailing list