gnutls_error_to_alert(3)
β¨ gnutls_error_to_alert β¨
okay bestie, welcome to gnutls_error_to_alert(3) β it's a page from the gnutls manual and honestly it's a little chaotic but we're gonna get through it together π
πΈ NAME πΈ
gnutls_error_to_alert β literally an API function, that's the whole name, no notes π
π SYNOPSIS π
#include <gnutls/gnutls.h>
int gnutls_error_to_alert(int err, int * level);
π¦ ARGUMENTS π¦
int errβ a negative integer, bestie. negative. that's the vibe check it has to pass.int * levelβ the alert level is gonna get stored right there in this pointer, so make sure it's pointing somewhere real π
π DESCRIPTION π
So here's the tea: this function takes the error code that some gnutls function handed you and gives you back the matching alert. that's it, that's the job π«Ά
β οΈ big important note: all alerts sent by this function should be considered FATAL. like, all of them. no cap.
the one single exception β the only one, the main character of exceptions β is when err is GNUTLS_E_REHANDSHAKE. in that one case, a warning alert should be sent to the peer, and the warning is basically saying "bestie, no renegotiation is happening, don't even ask" π
and if there's literally no mapping to a valid alert? then you get the alert that signals an internal error: GNUTLS_A_INTERNAL_ERROR. that's the fallback, periodt π
β RETURNS β
the alert code you should use for a particular error code. that's the return value, slay β¨
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the devs:
- 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.
like... iconic of them honestly π
π 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, then go visit:
https://www.gnutls.org/manual/
and that's the whole page fr fr πΈ this was gnutls_error_to_alert(3) from the gnutls manual, version 3.8.13, brought to you by the gnutls peeps. mwah, go ship something secure ππ
π¦
π¦ 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