gnutls_alert_get(3)
π gnutls_alert_get β the tea on your last alert π
okay bestie, welcome to the gnutls manual, page gnutls_alert_get(3). this one's short, sweet, and honestly? lowkey essential. let's get into it π«Ά
β¨ NAME β¨
gnutls_alert_get β the API function that tells you what your peer was screaming about π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
gnutls_alert_description_t gnutls_alert_get(gnutls_session_t session);
like. she's tiny. she's one line. she ate and left no crumbs β¨
π ARGUMENTS π
gnutls_session_t sessionβ bestie, this is literally just agnutls_session_ttype. that's it. that's the whole argument. your session, your vibe, your alert receipts π¬
π¦ DESCRIPTION π¦
so here's the deal: this function returns the last alert number received. the last one. not the first, not the one you wish you got β the most recent one, periodt.
you should be calling this when a gnutls function hands you back one of these two little guys:
GNUTLS_E_WARNING_ALERT_RECEIVEDGNUTLS_E_FATAL_ALERT_RECEIVED
because when you see one of those errors, your peer is basically sending you a little note. the manpage says the peer may send alerts if he encounters an error β and yeah, we're translating that into 2024: the other side hit a problem and they're telling you about it. not me assuming the peer's pronouns, that's just what the original says π
β οΈ and this is the important bit, so don't scroll past: if no alert has been received, the returned value is undefined. undefined. not zero, not "nothing", not a cute little sentinel β undefined. so don't go calling this out of the blue and trusting what comes back, okay? vibe check first. π
π RETURNS π
the last alert received β a gnutls_alert_description_t value. that's your answer. that's the whole tea β
π REPORTING BUGS π
found a bug? not me gatekeeping β go tell the devs:
- report bugs to <bugs@gnutls.org>
- home page: https://www.gnutls.org
they want to know. fr fr. π
π 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. iconic behavior honestly β free to share, just keep the receipts π
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does not contain the HTML form, bestie, just go visit:
https://www.gnutls.org/manual/
it's all there. every last crumb. π§
and that's the page!! gnutls version 3.8.13, gnutls_alert_get(3) β catch you in the next manpage, 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