gnutls_supplemental_register(3)

πŸ’– gnutls_supplemental_register(3) β€” the gnutls manual, bestie edition πŸ’–

okay so you're reading the gnutls manual, and today's main character is gnutls_supplemental_register(3). she registers supplemental data types. it's giving ✨custom handshake extensions✨. let's get into it 🫢


🌸 NAME 🌸

gnutls_supplemental_register β€” an API function, no cap


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

int gnutls_supplemental_register(const char * name,
gnutls_supplemental_data_format_type_t type, gnutls_supp_recv_func
recv_func, gnutls_supp_send_func send_func);

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * name β€” the name of the supplemental data you wanna register, bestie πŸ’…
  • gnutls_supplemental_data_format_type_t type β€” the type of the supplemental data format, iconic
  • gnutls_supp_recv_func recv_func β€” the function that receives the data πŸ“₯
  • gnutls_supp_send_func send_func β€” the function that sends the data πŸ“€

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function registers a brand new supplemental data type (rfc4680, iykyk). the data you register just stays registered until gnutls_global_deinit() gets called β€” it's committed, it's loyal, it's not going anywhere πŸ₯Ή

the type you hand over has to be an unassigned type inside gnutls_supplemental_data_format_type_t. and if that type is already registered, or GnuTLS is already handling it internally, you get GNUTLS_E_ALREADY_REGISTERED back. like, sorry babe, taken πŸ’€

⚠️ this function is not thread safe. and bc supplemental data isn't defined under TLS 1.3, calling this will disable TLS 1.3 support globally. yes, globally. the whole vibe. lowkey devastating but that's the deal 😭

🌈 RETURNS 🌈

GNUTLS_E_SUCCESS on success, otherwise a negative error code. simple as that, periodt ✨


⭐ SINCE ⭐

3.4.0 β€” she's been around a minute, respect the elder 🫑


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, tell the devs:


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. slay, honestly πŸ’œ


🧚 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!! you just read gnutls_supplemental_register(3) from the gnutls manual, version 3.8.13, Β© 2001-2023 Free Software Foundation, Inc. and others. go forth and register responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from