gnutls_record_send_range(3)
π gnutls_record_send_range β the API function β¨
okay bestie, so this is a page from the gnutls manual, and it's all about gnutls_record_send_range(3). Sit down, hydrate, let's get into it π«Ά
πΈ NAME πΈ
gnutls_record_send_range β it's an API function, periodt.
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
ssize_t gnutls_record_send_range(gnutls_session_t session, const void *
data, size_t data_size, const gnutls_range_st * range);
π ARGUMENTS π
gnutls_session_t sessionβ it's agnutls_session_ttype, literally what it says on the tin πconst void * dataβ this holds the data you wanna send, that's the whole vibesize_t data_sizeβ the length of that data, yes we're countingconst gnutls_range_st * rangeβ the range of lengths that the real data length has to hide inside. like a little disguise for your byte count π₯Έ
π¦ DESCRIPTION π¦
So here's the tea. This function works like gnutls_record_send() does β but β and this is the part that ate, honestly β while gnutls_record_send() only slaps minimal padding onto every TLS record, this one uses the TLS extra-padding feature to hide the actual real data size inside that range of lengths you handed it. length hiding, we love to see it π
β οΈ heads up though: some TLS sessions just do NOT support extra padding β think stream ciphers in standard TLS, or SSL3 sessions. so rude of them.
If you wanna know whether your current session supports extra padding (and therefore length hiding), go check the gnutls_record_can_use_length_hiding() function. iykyk π
π NOTE π
This function is currently limited to blocking sockets only. that's it. that's the note. don't come for me, i don't make the rules π«
π RETURNS π
The number of bytes sent β which is, on a successful invocation, literally data_size β or a negative error code if it went sideways. no in-between, bestie.
π REPORTING BUGS π
Found a bug? Tell the gnutls girlies about it:
- Report bugs to <bugs@gnutls.org>
- Home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
(yes, that's the actual license text, i'm not paraphrasing legal stuff, i'm not reckless π)
π SEE ALSO π
The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, go visit:
https://www.gnutls.org/manual/
gnutls 3.8.13 β that's the version and the source, and this lil page is gnutls_record_send_range(3). mwah, go forth and hide those lengths responsibly π
β¨π¦
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms