gnutls_record_send2(3)
π gnutls_record_send2(3) π
okay bestie, welcome to the gnutls manual page for gnutls_record_send2. yes it's the sequel. and yes, it ate. π
β¨ NAME β¨
gnutls_record_send2 β literally just an API function, that's it, that's the name π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
ssize_t gnutls_record_send2(gnutls_session_t session, const void * data,
size_t data_size, size_t pad, unsigned flags);
π¦ ARGUMENTS π¦
gnutls_session_t sessionβ bestie this is agnutls_session_ttype. the whole vibe of your connection lives here.const void * dataβ contains the data to send. the actual payload, the main character of this whole function fr.size_t data_sizeβ is the length of the data. how much of thatdatawe're actually shipping out π¦size_t padβ padding to be added to the record. yes, extra filler bytes, on purpose, we'll explain below.unsigned flagsβ must be zero. not "should be", not "ideally" β must be zero. don't try it. π«
π DESCRIPTION π
okay so this function is identical to gnutls_record_send() β same energy, same job β except it takes an extra argument that lets you specify padding to be added to the record. that's the whole glow-up. β¨
to figure out the maximum size of padding you can use, hit up gnutls_record_get_max_size() and gnutls_record_overhead_size(). those two will tell you what you're working with.
π«Ά heads up: in order for GnuTLS to provide constant time processing of padding and data in TLS1.3, the flagGNUTLS_SAFE_PADDING_CHECKmust be used ingnutls_init(). no cap, this one matters.
β RETURNS β
the number of bytes sent, or a negative error code. π
and listen β the number of bytes sent might be less than data_size. so don't just assume it all went out in one go, okay?
the maximum number of bytes this function can send in a single call depends on the negotiated maximum record size. so it's giving... situational. it depends. π
π SINCE π
3.6.3 β been around since then, iconic behavior honestly π
π REPORTING BUGS π
found a bug? report it to bugs@gnutls.org. they wanna hear about it fr fr.
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. so like, go off, just keep the receipts. π§Ύ
πΈ 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, visit:
https://www.gnutls.org/manual/
and that's the whole page, bestie!! this was written for the gnutls manual, version 3.8.13 β stay safe out there, keep your flags at zero, and remember: padding is not a personality trait, it's a security feature π
β¨π¦
π¦ 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