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 a gnutls_session_t type. 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:


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