gnutls_reauth(3)
π gnutls_reauth(3) β the gnutls manual, but make it cute π
okay bestie, buckle up, we're doing an API function today and she's lowkey a whole moment π
β¨ NAME β¨
gnutls_reauth β literally just an API function, that's the whole vibe π
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_reauth(gnutls_session_t session, unsigned int flags);
πΈ ARGUMENTS πΈ
gnutls_session_t sessionβ bestie it's agnutls_session_ttype, that's it, that's the whole description, no notes πunsigned int flagsβ must be zero. zero. nothing. nada. don't get creative with it fr fr
π¦ DESCRIPTION π¦
so this function does the post-handshake authentication for TLS 1.3 β¨
the post-handshake authentication gets initiated by the server β the server is the one calling this function, main character energy π. and the clients respond when GNUTLS_E_REAUTH_REQUEST has been seen while they're receiving data.
now, the non-fatal errors this function is expected to throw at you are:
GNUTLS_E_INTERRUPTEDGNUTLS_E_AGAIN- and
GNUTLS_E_GOT_APPLICATION_DATAβ but only when you call it on the server side
the first two ones (GNUTLS_E_INTERRUPTED and GNUTLS_E_AGAIN) interrupt the authentication procedure because the transport layer got interrupted, periodt. and the third one happens because there was pending data sitting there before the peer initiated the re-authentication. in that case the server should read/process that data as unauthenticated and then retry calling gnutls_reauth() again πͺ
π¨ important: when you call this function under TLS1.2 or earlier, or the peer didn't advertise post-handshake auth, it always fails with GNUTLS_E_INVALID_REQUEST. no exceptions bestie, it's giving hard no.
the verification of the received peer's certificate? that's delegated to the session or credentials verification callbacks π«Ά. and a server can check whether post handshake authentication is supported by the client by checking the session flags with gnutls_session_get_flags() π
also β and this is the part people skip and then cry about π β prior to calling this function on the server side, you must call gnutls_certificate_server_set_request() and set the expectations for the received certificate (request or require). if none are set, this function will return GNUTLS_E_INVALID_REQUEST π
and ngl, here's the tea: post handshake authentication is available irrespective of the initial negotiation type (PSK or certificate) π. in all cases though, certificate credentials must be set to the session prior to calling this function β no cert credentials, no reauth, that's the rule β
π RETURNS π
GNUTLS_E_SUCCESS on a successful authentication π, otherwise a negative error code π
π REPORTING BUGS π
found a bug? tell the devs, they wanna know, no gatekeeping:
- 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. (iconic, honestly β free to copy, just keep the receipts π§Ύ)
π 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, go visit:
https://www.gnutls.org/manual/
that's the whole page bestie, you ate it π
β¨ this was gnutls version 3.8.13, and the page itself is gnutls_reauth(3) β mwah, go forth and reauth responsibly π«Άππ¦
π¦ 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