GNUTLS_X509_EXT_EXPORT_TLSFEATURES(3)

✨ gnutls_x509_ext_export_tlsfeatures ✨

okay bestie, buckle up πŸ’– this one lives in the gnutls manual, section 3 β€” yes, the gnutls library, the TLS icon itself πŸ‘‘. It's a lil API function and it's lowkey the moment your TLS features struct gets its glow-up into actual wire format. Let's go πŸ¦‹


NAME πŸ’…

gnutls_x509_ext_export_tlsfeatures β€” bestie, it's an API function. That's the whole vibe.


SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_tlsfeatures(gnutls_x509_tlsfeatures_t f,
gnutls_datum_t * ext);

like. look at her. so clean ✨


ARGUMENTS πŸŽ€

  • gnutls_x509_tlsfeatures_t f β€” the features structure. your little bundle of TLS feature joy, the thing you're about to export 🫢
  • gnutls_datum_t * ext β€” the DER-encoded extension data goes here. and listen: it must be freed using gnutls_free(). not free(), not vibes, not hopes and dreams. gnutls_free(). periodt πŸ’€

DESCRIPTION πŸ¦‹

so what does she actually do? this function converts the provided TLS features structure β€” structure β€” (yes, the original says it twice, and honestly? iconic, she's emphatic) into a DER-encoded TLS features PKIX extension πŸ”₯

and the output data in ext? that gets allocated using gnutls_malloc() πŸ’– so it's gnutls's memory, gnutls's rules, gnutls's cleanup. iykyk.


RETURNS ⭐

  • on success, you get GNUTLS_E_SUCCESS (0) πŸŽ‰ slay
  • otherwise? a negative error value 😭 so like. check it. please. for me. πŸ™ˆ

SINCE 🌈

3.5.1 β€” she's been here since 3.5.1, an elder, a legend, a main character who predates half your dependencies πŸ’œ


REPORTING BUGS πŸ›

found a bug? do not suffer in silence, tell the devs:

they wanna hear it fr fr 🫢


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. (translation: share her, just 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, go visit:

https://www.gnutls.org/manual/

reminder bestie: free that ext with gnutls_free(). i will know. the compiler might not, but i will. πŸ’…

mwah πŸ’‹ that was gnutls version 3.8.13, page gnutls_x509_ext_export_tlsfeatures(3) β€” go forth, export your features, and stay hydrated πŸ“βœ¨

πŸ“¦ where this page comes from