gnutls_global_init(3)
π gnutls_global_init(3) π
okay bestie, we're doing gnutls_global_init from the gnutls manual, and honestly? this one is giving quiet luxury β¨ it's the "you probably don't even have to call me" icon of the API.
πΈ NAME πΈ
gnutls_global_init β API function π
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_global_init( void);
π ARGUMENTS π
voidβ literally no arguments. she takes nothing. she gives everything. π
π¦ DESCRIPTION π¦
okay so here's the tea π β since GnuTLS 3.3.0 this function is no longer necessary to be explicitly called. she's already there for you. main character energy, no invitation needed.
but if you wanna be β¨differentβ¨ and turn off that implicit call (which happens in a library constructor, iykyk), just set the environment variable GNUTLS_NO_IMPLICIT_INIT to 1. that's it. that's the whole vibe check.
so what does she actually do when she runs? she:
- performs any required precalculations
- detects the supported CPU capabilities
- initializes the underlying cryptographic backend
and when you're done with gnutls and don't need her anymore? you should call gnutls_global_deinit() to free any resources taken by this call. no ghosting her resources, bestie. π«Ά
here's the cute part: this function increments a global counter, so that gnutls_global_deinit() only releases resources when it's been called as many times as gnutls_global_init(). that's genuinely so useful when GnuTLS is used by more than one library in an application β everyone gets their turn, nobody steals the aux. π§
she can be called many times, but she'll only actually do something the first time. lowkey efficient. and she's thread safe since GnuTLS 3.3.0. periodt.
β οΈ one thing to know fr fr: a subsequent call of this function, if the initial call has failed, will return the same error code. she remembers. she holds grudges (affectionately). π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise a negative error code is returned. sad girl hours. π
π REPORTING BUGS π
found something cursed? 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. slay, and legally so. π
π 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 was gnutls 3.8.13, gnutls_global_init(3), and she ate. no crumbs. bye pookie πβ¨
π¦ 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