gnutls_session_key_update(3)
π gnutls_session_key_update π
okay bestie, so this one is from the gnutls manual β yes, that gnutls, the TLS library that's lowkey carrying half the internet's encrypted vibes β¨ β and today we're learning about gnutls_session_key_update, which is exactly what it sounds like: refreshing your session keys. it's giving "new year new me" but for cryptographic material. periodt. π
β¨ NAME β¨
gnutls_session_key_update β API function π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_session_key_update(gnutls_session_t session, unsigned flags);
π ARGUMENTS π
gnutls_session_t sessionβ is agnutls_session_ttype. that's it, that's the whole description, she's self-describing and honestly? iconic. πunsigned flagsβ zero ofGNUTLS_KU_PEER. (yes babes, the original says "zero of" and not "zero or" β we are simply passing along the lore exactly as it was handed to us, no cap π«Ά)
π¦ DESCRIPTION π¦
so here's the tea: this function will update/refresh the session keys when the TLS protocol is 1.3 or better. the peer gets notified of the update by sending a message β so think of it less like a quiet little local refresh and more like a whole group-chat announcement that the keys are changing. π£
because of that, this function should be treated similarly to gnutls_record_send() --i.e., it may return GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED. so yeah, it can totally need you to come back around and try again. don't ghost it, just call it again. π
when this flag GNUTLS_KU_PEER is specified, this function β in addition to updating the local keys β will ask the peer to refresh its keys too. mutual glow-up energy fr fr. β¨π€β¨
and if the negotiated version is not TLS 1.3 or better? this function will return GNUTLS_E_INVALID_REQUEST. she said "wrong era, not my problem." π
β RETURNS β
GNUTLS_E_SUCCESS on success, otherwise a negative error code. slay when it works, check the sign when it doesn't. π
π SINCE π
3.6.3 β an elder, honestly. been holding it down since way back. π
π REPORTING BUGS π
found a bug? don't be shy, tell the maintainers:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
they want to know. seriously. ππ
π 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. (free to share, just keep the receipts. we love a license that respects the vibe. π«Ά)
π₯ 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!! πβ¨ go forth and rotate those keys responsibly. this one shipped as gnutls version 3.8.13, and it's the gnutls_session_key_update page itself β no date on the footer, she's mysterious like that π mwah, ily, 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