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 usinggnutls_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 π
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
- 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