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 agnutls_session_ttype. 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:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π§ COPYRIGHT π§
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms