gnutls_record_get_state(3)
π gnutls_record_get_state β the manual page, but make it make sense π
okay bestie, this one's from the gnutls manual (section 3, the library-calls girlies), and it's all about grabbing the current record state so you can hand it off to some other lil machine. let's go π«Ά
β¨ NAME β¨
gnutls_record_get_state β literally just an API function, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_record_get_state(gnutls_session_t session, unsigned read,
gnutls_datum_t * mac_key, gnutls_datum_t * IV, gnutls_datum_t *
cipher_key, unsigned char [8] seq_number);
π ARGUMENTS π
gnutls_session_t sessionβ it's agnutls_session_ttype, bestie. the session. the main character. πunsigned readβ if this is non-zero you get the read parameters back, otherwise you get the write ones. pick your fighter πgnutls_datum_t * mac_keyβ the key used for MAC (only if a MAC is actually used, so like, don't be shocked if it's giving nothing) πgnutls_datum_t * IVβ the initialization vector or nonce that's in use β¨gnutls_datum_t * cipher_keyβ the cipher key, periodt πunsigned char [8] seq_numberβ a 64-bit sequence number, exactly 8 bytes of it, no more no less π
π¦ DESCRIPTION π¦
so this function returns the parameters of the current record state. and honestly? these are only useful when you're feeding them to an external off-loading device or subsystem β like if some other chip is doing the crypto for you and you're just the messenger π§
the returned values should be considered constant and valid for the lifetime of the session. so don't go editing them, don't go expecting them to change, they're set. iconic behaviour tbh.
in that case (the off-loading one, iykyk), to sync the state back you must call gnutls_record_set_state(). mandatory. no skipping. it's giving two-step dance and you need both steps πΊ
β RETURNS β
GNUTLS_E_SUCCESS on success, or an error code if the universe said no π
since 3.4.0 β so this has been around a minute, it's not new new π
π REPORTING BUGS π
found a bug? tell the girlies at <bugs@gnutls.org>. they wanna know 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. so like, go off, but 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, visit
https://www.gnutls.org/manual/
and that's the whole page, bestie!! this was gnutls_record_get_state(3) from the gnutls manual, version 3.8.13 π mwah, go sync those states 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