gnutls_alert_send_appropriate(3)
π gnutls_alert_send_appropriate π
okay bestie, so this one lives in the gnutls manual, and it's the function that's like... the polite friend who knows exactly how to say "hey, something's wrong" in the right tone. It's giving emotional intelligence but for TLS alerts. π«Ά
β¨ NAME β¨
gnutls_alert_send_appropriate β API function
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_alert_send_appropriate(gnutls_session_t session, int err);
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is agnutls_session_ttype. that's it, that's the whole description, no cap.int errβ this is an error code that some other GnuTLS function handed back to you. like, you got a bad vibe from a function and now you're passing that vibe along.
π DESCRIPTION π
So what it does is: it sends an alert to the peer, and which alert it sends depends on the error code that a gnutls function gave you. Internally it will call gnutls_error_to_alert() to figure out the appropriate alert to send. like it does the social math for you. β¨
This function may also return GNUTLS_E_AGAIN, or GNUTLS_E_INTERRUPTED. periodt.
ok so here's the lore, and it matters: this function historically was always sending an alert to the peer, even iferrwas inappropriate to respond with an alert β for exampleGNUTLS_E_SUCCESS. π that's like texting "we need to talk" after a totally normal conversation. Since 3.6.6 though, this function returns success without transmitting any data on error codes that should not result to an alert. glow up honestly. π
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code is returned. simple as that, no crumbs. π
π 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.
π¦ 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 π it came from gnutls 3.8.13, dated like the footer says, and it's the gnutls_alert_send_appropriate(3) page β go send some appropriate alerts, you absolute icon. πβ¨π¦
π¦ 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