gnutls_priority_init(3)
π gnutls_priority_init(3) β the gnutls manual, but make it make sense π
okay bestie, sit down, hydrate, because today we're learning how to tell GnuTLS what crypto vibes you want. this is gnutls_priority_init from the gnutls manual and she's a whole API function. β¨
πΈ NAME πΈ
gnutls_priority_init β literally the API function, that's her, that's the name π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_priority_init(gnutls_priority_t * priority_cache, const char
* priorities, const char ** err_pos);
yes the line wrap in the header file is real, we don't gatekeep π
β¨ ARGUMENTS β¨
gnutls_priority_t * priority_cacheβ bestie this is agnutls_priority_ttype. that's the whole description. it's giving "the thing you're initializing" πconst char * prioritiesβ a string that describes your priorities. and yes, she can beNULL, she's flexible like that π«Άconst char ** err_posβ if something goes wrong, this lil guy gets the position in the string where the error happened. like a little "u messed up here" pin π
π DESCRIPTION π
okay so first things first, a real talk moment. if your app does not modify its crypto settings per release, pls consider using gnutls_priority_init2() with the GNUTLS_PRIORITY_INIT_DEF_APPEND flag instead. we're suggesting you let the GnuTLS library handle centralized crypto settings, and let apps just modify the default settings to their needs. it's the "don't do it yourself, it's handled" energy, no cap π₯
now the actual tea: this function is identical to gnutls_priority_init2() with zero flags. same girl, different door πͺ
and listen β a NULL priorities string means the default priorities get used. iconic. this has been available since GnuTLS 3.3.0, so it's not new-new, it's just good. β
π RETURNS π
- syntax error? you get
GNUTLS_E_INVALID_REQUEST. rip π - success?
GNUTLS_E_SUCCESS, slay π - anything else? you get an error code, as one does.
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the girlies:
- 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. so like, go off, but 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/
and that's the whole page, bestie!! no notes, we ate π
this was gnutls 3.8.13, and the page is gnutls_priority_init(3) β mwah, go forth and set your priorities π
β¨π
π¦ 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