gnutls_session_set_data(3)

✨ gnutls_session_set_data ✨

okay bestie, welcome to the gnutls manual πŸ’– this lil page is gnutls_session_set_data(3) and it's lowkey one of the most useful glow-ups in the whole session-resumption saga. sit down, grab a strawberry πŸ“, we're doing this.


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_session_set_data(gnutls_session_t session, const void *
session_data, size_t session_data_size);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is literally just a gnutls_session_t type. that's it. that's the vibe.
  • const void * session_data β€” a pointer to the space that's gonna hold the session 🫢
  • size_t session_data_size β€” the size of that session, no cap

πŸ‘‘ DESCRIPTION πŸ‘‘

so the way this works: it sets all the session parameters, so you can resume a session you already established earlier. iconic behaviour, truly main character energy ✨

the session data you hand over must be the exact stuff that came back from gnutls_session_get_data(). don't be out here freelancing with random bytes πŸ’€

and like, call this function before gnutls_handshake(). before. periodt. πŸ™ˆ

okay important heads-up bestie: session resuming is advisory. the server is fully allowed to look at your cute little resume request and go "nah". if that happens, a full handshake gets performed instead. not me being ignored by the server 😭 it's giving unread message.

πŸ’… RETURNS πŸ’…

if it slays: GNUTLS_E_SUCCESS (that's 0) comes back to you πŸ₯³

if it doesn't: you get an error code instead. vibe check failed, but at least you know.


πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, tell the 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. (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, go visit:

https://www.gnutls.org/manual/


and that's the whole page bestie, you ate it πŸ’– this was gnutls_session_set_data(3) from the gnutls manual, version 3.8.13 β€” thanks for reading, mwah, go resume some sessions responsibly πŸ¦‹πŸŽ€πŸ’…

πŸ“¦ where this page comes from