gnutls_session...t_enable_server(3)

πŸ’– gnutls_session_ticket_enable_server(3) β€” the gnutls manual, but make it cute πŸ’–

okay bestie, welcome to the gnutls manual page for gnutls_session_ticket_enable_server, straight out of section 3 of the gnutls docs. this is the API function energy you came for, and we're gonna read it together like it's a group chat. grab a strawberry πŸ“ and let's go.


✨ NAME ✨

gnutls_session_ticket_enable_server β€” it's an API function, that's literally the whole vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

okay so here's the spell you gotta cast:

#include <gnutls/gnutls.h>

int gnutls_session_ticket_enable_server(gnutls_session_t session, const
                                        gnutls_datum_t * key);

like yes, it's a function that returns an int, and yes, that include is non-negotiable. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” bestie this is literally just a gnutls_session_t type. that's it. that's the whole thing. it's the session you're working with. 🫢
  • const gnutls_datum_t * key β€” the key used to encrypt session parameters. protect it like it's your main character secret. πŸ”

πŸ’œ DESCRIPTION πŸ’œ

okay so the actual tea: you're asking the server to try session resumption using session tickets β€” which basically means delegating the storage to the client. the server doesn't wanna hold all that, so it hands the ticket over. slay, efficient, iconic. ✨

that key you pass in? it must be initialized using gnutls_session_ticket_key_generate(). no shortcuts, no DIY, use the function. πŸ”₯

⚠️ and listen β€” to avoid leaking that key, use gnutls_memset() prior to releasing it. like, wipe it. don't leave your key lying around for just anybody, that's not the vibe. 😭

also, the default ticket expiration time can be overridden using gnutls_db_set_cache_expiration(). so if you want a different expiry, that's your girl. πŸ’…


⭐ RETURNS ⭐

on success you get GNUTLS_E_SUCCESS (which is 0), or an error code. so check it, bestie. don't just assume. πŸ™ˆ


πŸŽ€ SINCE πŸŽ€

2.10.0 β€” this has been around since way before it was cool. vintage. πŸ’–


🌈 REPORTING BUGS 🌈

found a bug? don't be shy, report it to <bugs@gnutls.org>. πŸ“§

home page: https://www.gnutls.org β€” go say hi. 🏠


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 yes, you can share it, just keep the receipts. periodt. πŸ“œβœ¨


🧚 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/

that's your one-stop shop, iykyk. πŸ”—


and that's a wrap, bestie 🫢 this was gnutls 3.8.13, page gnutls_session_ticket_enable_server(3). go encrypt responsibly and hydrate. πŸ’…πŸ’–

πŸ“¦ where this page comes from