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 identity
  • gnutls_ext_parse_type_t parse_point β€” the parse type of the extension (go peek at gnutls_ext_parse_type_t for 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 Β© 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