gnutls_bye(3)
π gnutls_bye(3) β the gnutls girlie's guide to saying goodbye π
okay so bestie, you're in the gnutls manual, page gnutls_bye(3), and this one is literally about β¨ending thingsβ¨ (the TLS connection, not the friendship, calm down π«Ά).
β¨ NAME β¨
gnutls_bye β API function
like... it's a function. in the API. that's the whole name situation π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how);
look at her. two args. so simple. so iconic. π
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is agnutls_session_ttype. that's it, that's the arg.gnutls_close_request_t howβ and this one is an integer, no cap.
π¦ DESCRIPTION π¦
okay so this function terminates the current TLS/SSL connection. periodt. the connection was supposed to have been started with gnutls_handshake() first β you can't break up with someone you never dated, iykyk π
how should be one of GNUTLS_SHUT_RDWR, GNUTLS_SHUT_WR. pick your goodbye energy:
- In case of
GNUTLS_SHUT_RDWR, the TLS session gets terminated and further receives and sends will be disallowed. if the return value is zero you may continue using the underlying transport layer.GNUTLS_SHUT_RDWRsends an alert containing a close request and waits for the peer to reply with the same message β it's giving mutual breakup, both parties agree π - In case of
GNUTLS_SHUT_WR, the TLS session gets terminated and further sends will be disallowed. in order to reuse the connection you should wait for an EOF from the peer.GNUTLS_SHUT_WRsends an alert containing a close request β one-sided, no waiting around, main character energy honestly π
β οΈ real talk though: not all implementations will properly terminate a TLS connection. some of them, usually for performance reasons, will terminate only the underlying transport layer, and thus not distinguishing between a malicious party prematurely terminating the connection and normal termination. so like... the vibe check is genuinely unreliable here. the way that a bad actor can just dip and it looks exactly the same as a polite goodbye π
this function may also return GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED; cf. gnutls_record_get_direction().
β RETURNS β
GNUTLS_E_SUCCESS on success π, or an error code β see function documentation for entire semantics.
π REPORTING BUGS π
found a bug? spill it to <bugs@gnutls.org>. they want the tea, fr fr. 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, no notes, go forth and terminate your sessions responsibly π
this has been gnutls_bye(3) from the gnutls manual, version 3.8.13 β thanks for reading the group chat, love u, bye πβ¨
π¦ 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