gnutls_priority_set_direct(3)

πŸ’– gnutls_priority_set_direct β€” the glow-up your TLS session's priorities deserve πŸ’–

okay bestie, so this is a page from the gnutls manual, and today's main character is gnutls_priority_set_direct(3). yes it's an "API function," no it's not boring, come with me πŸ¦‹


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

int gnutls_priority_set_direct(gnutls_session_t session, const char *
       priorities, const char ** err_pos);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” it's a gnutls_session_t type, periodt. that's the whole vibe.
  • const char * priorities β€” a string that describes your priorities. like, the string is the priorities. iykyk.
  • const char ** err_pos β€” if something goes wrong, this bad boy gets pointed at the exact position in the string where the error happened. super helpful, ngl 🫢

🌸 DESCRIPTION 🌸

so what it does: it sets the priorities to use on the ciphers, key exchange methods, and macs. iconic behavior honestly.

this function avoids keeping a priority cache, and instead it's used to directly set string priorities to a TLS session. it's giving lowkey efficient, highkey specific πŸ’…

for documentation on all this, go check gnutls_priority_init() β€” that's where the lore lives πŸ“–

and bestie, listen: to use a reasonable default, consider using gnutls_set_default_priority(), or gnutls_set_default_priority_append() instead of this function. fr fr, don't make your life harder than it needs to be 🌈

⭐ RETURNS ⭐

  • on a syntax error, you get GNUTLS_E_INVALID_REQUEST 😭
  • on success, you get GNUTLS_E_SUCCESS ✨
  • or, you know, just an error code. as a treat. πŸ’€

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, tell the girlies:

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org


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.

(that's the legal tea, and we're respecting it fully πŸ“)


🧚 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, bestie!! this one's from gnutls 3.8.13, and if you were wondering about the date, it's just gnutls_priority_set_direct(3) doing its thing at the bottom of the page like a little signature. go set those priorities and slay πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from