GNUTLS_X509_EXT_EXPORT_SUBJECT_ALT_NAMES(3)

πŸ’– gnutls_x509_ext_export_subject_alt_names β€” bestie edition πŸ’–

okay so you're in the gnutls girlie universe and you found the page for gnutls_x509_ext_export_subject_alt_names(3). periodt. let's get into it πŸŽ€


✨ NAME ✨

gnutls_x509_ext_export_subject_alt_names β€” it's an API function, and it's giving "turn my little list of alt names into real DER bytes" πŸ¦‹


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_subject_alt_names(gnutls_subject_alt_names_t
sans, gnutls_datum_t * ext);

like. she's just a girl. a function. with two arguments. no cap ✨


🫢 ARGUMENTS 🫢

  • gnutls_subject_alt_names_t sans β€” the alternative names, bestie. the whole point. this is your little bag of names you collected earlier πŸ’…
  • gnutls_datum_t * ext β€” the DER-encoded extension data. and listen, this one is important: it must be freed using gnutls_free(). don't forget. don't ghost it. free your girl or she'll leak 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? she takes the alternative names structure you hand her (sans) and converts it into a DER-encoded SubjectAltName PKIX extension. iconic behaviour, honestly.

and the output data that lands in ext? it gets allocated using gnutls_malloc(). so like. that's why you free it with gnutls_free(). they match. they're a set. don't mix and match your allocators, that's not the vibe 🚫


⭐ RETURNS ⭐

on success you get GNUTLS_E_SUCCESS (0) β€” slay, queen, it worked 🌈

otherwise you get a negative error value. negative. like her mood when the extension won't encode πŸ’€


πŸŽ€ SINCE πŸŽ€

3.3.0 β€” she's been here since 3.3.0, she's a legacy icon, respect her πŸ‘‘


πŸ› REPORTING BUGS πŸ›

found a bug? (not me manifesting one πŸ™ˆ) report it to:

  • <bugs@gnutls.org>

and the home page, for the curious:


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. like, go off, share it, just keep the receipts πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

the full documentation for gnutls is maintained as a Texinfo manual. and if the /usr/share/doc/gnutls/ directory does not contain the HTML form, bestie, just visit:

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

that's the whole page, that's the tea πŸ“


mwah πŸ’… this was gnutls version 3.8.13, and yes, the page title was gnutls_x509_ext...bject_alt_names(3) the whole time β€” truncated like a text message from someone who types too fast. love that for us. bye bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from