gnutls_ext_get_current_msg(3)

✨ NAME ✨

gnutls_ext_get_current_msg β€” an API function, bestie πŸ’– (yes it's a whole function, and it's part of the gnutls manual, in case you were wondering who was texting you at 2am)


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

unsigned gnutls_ext_get_current_msg(gnutls_session_t session);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” a gnutls_session_t opaque pointer. that's it, that's the whole argument, she's mysterious, you don't get to peek inside her 🫢

πŸ’… DESCRIPTION πŸ’…

okay so picture this: you're an extension handler, right? living your life, doing handler things, and suddenly you're like… wait. which message am i even being called from?? 😭 and that's exactly what this function is here for.

It lets an extension handler obtain the message this extension is being called from. slay. πŸ’…

The returned value is a single entry of the gnutls_ext_flags_t enumeration β€” not a pile of them, not a combo, one (1) entry, periodt. ✨

Example so it hits: if an extension was registered with the GNUTLS_EXT_FLAG_HRR and GNUTLS_EXT_FLAG_EE flags, the value when called during parsing of the encrypted extensions message will be GNUTLS_EXT_FLAG_EE. see how it zeroes in on the one relevant flag? main character energy, honestly πŸ‘‘

⚠️ And now the important bit: if not called under an extension handler, its value is undefined. undefined!! we do not know what she's gonna say. no cap. do not build your whole personality around that return value outside of a handler, bestie πŸ’€

πŸ¦‹ SINCE πŸ¦‹

3.6.3 β€” she's been iconic since 3.6.3, lowkey an elder stateswoman of the API 🌈


πŸ“ REPORTING BUGS πŸ“

found a bug? don't just scream into the group chat, actually tell the people who can fix it πŸ’–


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. fr fr, just keep the notice and you're good 🫢


🌈 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, babe πŸ’– this was gnutls version 3.8.13, dropping gnutls_ext_get_current_msg(3) into your brain like the little knowledge gift it is πŸŽ€βœ¨ go forth and know which message you're in, iykyk 🌸

πŸ“¦ where this page comes from