gnutls_handshake_set_random(3)
π gnutls_handshake_set_random(3) π
okay bestie, welcome to the gnutls manual, and this one is literally called gnutls_handshake_set_random β an API function π. yes it's a whole vibe, and yes you're gonna get it.
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_handshake_set_random(gnutls_session_t session, const
gnutls_datum_t * random);
like, that's the whole shape of it. two args, one int coming back at you π«Ά
πΈ ARGUMENTS πΈ
gnutls_session_t sessionβ bestie this is agnutls_session_ttype. that's it, that's the tea βconst gnutls_datum_t * randomβ a random value of 32-bytes β¨. thirty-two. not 31, not 33. iykyk.
π DESCRIPTION π
so here's the deal: this function will explicitly set the server or client hello random value in the subsequent TLS handshake π₯. the random value should be a 32-byte value. periodt.
note that this function should not normally be used, because gnutls will select automatically a random value for the handshake. so likeβ¦ the library already has main character energy and handles this for you π
also!! this function should not be used when resuming a session. no cap, don't do it π
β RETURNS β
GNUTLS_E_SUCCESS on success, or an error code. that's the whole thing, bestie β slay when it works, read the error code when it doesn't π
and pssstβ¦ Since 3.1.9 π¦ (so it's been iconic for a minute)
π REPORTING BUGS π
found a bug? don't be shy, tell the gnutls girlies:
- 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. (translation: it's free, just keep the receipts, bestie π)
π 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, fr fr π this was gnutls version 3.8.13 in the gnutls 3.8.13 era, with gnutls_handshake_set_random(3) as the moment of the day β go forth and set your random bytes responsibly, bestie πβ¨π«Ά
π¦ 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