gnutls_ext_register(3)
π NAME π
gnutls_ext_register β bestie, this is the API function that lets you register your very own TLS extension into the gnutls fam. yes, like actually making one. main character energy fr.
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_ext_register(const char * name, int id,
gnutls_ext_parse_type_t parse_point, gnutls_ext_recv_func recv_func,
gnutls_ext_send_func send_func, gnutls_ext_deinit_data_func deinit_func,
gnutls_ext_pack_func pack_func, gnutls_ext_unpack_func unpack_func);
π ARGUMENTS π
const char * nameβ the name of the extension to register. like, its government name πint idβ the numeric TLS id of the extension. the digits, the vibes, the identitygnutls_ext_parse_type_t parse_pointβ the parse type of the extension (go peek atgnutls_ext_parse_type_tfor the deets)gnutls_ext_recv_func recv_funcβ a function to receive the data π₯gnutls_ext_send_func send_funcβ a function to send the data π€gnutls_ext_deinit_data_func deinit_funcβ a function deinitialize any private data. yes bestie, clean up after yourself π§Ήgnutls_ext_pack_func pack_funcβ a function which serializes the extension's private data (used on session packing for resumption)gnutls_ext_unpack_func unpack_funcβ a function which will deserialize the extension's private data
πΈ DESCRIPTION πΈ
okay so. This function will register a new extension type. π¦
The extension will remain registered until gnutls_global_deinit() is called. it's committed, it's locked in, it's giving forever-until-you-say-goodbye energy.
If the extension type is already registered then GNUTLS_E_ALREADY_REGISTERED will be returned. like bestie we KNOW her, she's already on the list π
Each registered extension can store temporary data into the gnutls_session_t structure using gnutls_ext_set_data(), and they can be retrieved using gnutls_ext_get_data(). stash it β¨ grab it back β¨
Any extensions registered with this function are valid for the client and TLS1.2 server hello (or encrypted extensions for TLS1.3).
not thread safe. π¨ no cap. if you're out here threading, you already know what to do. do NOT come for me when it goes sideways.
π«Ά RETURNS π«Ά
GNUTLS_E_SUCCESS on success, otherwise a negative error code. we love a success slay, and we tolerate a negative number with grace π
β SINCE β
3.4.0 β old enough to be iconic, still serving π
π REPORTING BUGS π
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.
π 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_ext_register(3) from the gnutls manual, version 3.8.13 β go register something iconic, 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