GNUTLS_SET_DEFAULT_PRIORITY_APPEND(3)

✨ NAME ✨

gnutls_set_default_priority_append β€” it's an API function, bestie, and it's the one you want when you just gotta sprinkle a little extra onto your defaults πŸ’…

This page lives in the gnutls manual, section 3, and it is giving "quietly essential" energy fr fr.


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_set_default_priority_append(gnutls_session_t session, const
char * add_prio, const char ** err_pos, unsigned flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is literally just a gnutls_session_t type. That's the whole vibe. That's the whole parameter.
  • const char * add_prio β€” a string describing the priorities you wanna append to the default. Like the little cherry on top πŸ“
  • const char ** err_pos β€” if something goes wrong, this is where the position in the string gets stored β€” i.e. exactly where in the string the error happened. Your little error GPS πŸ—ΊοΈ
  • unsigned flags β€” must be zero. Zero, queen. Not "small". Not "just one". Zero. 🚫

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this function sets the default priority for your ciphers, key exchange methods, and macs β€” with the extra options from add_prio tacked on. It's literally the defaults + your lil additions. Iconic.

And ngl? This is the recommended way to set defaults when you've only got a few extra options to add. Because the way that it promotes consistency between applications using GnuTLS?? Chef's kiss. It also lets GnuTLS-using applications update their settings in par with the library, which means everybody stays in sync and nobody's out here running stale config. Consistency slay πŸ’…

Okay but lowkey important: the add_prio string should start as a normal priority string, e.g., with ':'. Don't skip that part, it's giving "required formatting" and it means it.

And if you want a user to be able to override the defaults β€” like when a user interface or a configuration file is available β€” then the functions gnutls_priority_set_direct() or gnutls_priority_set() are the ones to reach for instead. Different tool, different job πŸ¦‹


⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success, or an error code. That's it, that's the return. Either we ate or we didn't 🫢


🌈 SINCE 🌈

3.6.3 β€” she's been here a minute, periodt.


πŸ‘‘ REPORTING BUGS πŸ‘‘

Found a bug? Don't suffer in silence, bestie:


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: share it, remix it, 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, visit

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


Okay that's the whole page, no cap. Go set those priorities, main character πŸ’–

gnutls 3.8.13 β€” signing off, mwah πŸ˜­βœ¨πŸŽ€

πŸ“¦ where this page comes from