GNUTLS_X509_EXT_IMPORT_SUBJECT_ALT_NAMES(3)
π gnutls_x509_ext_import_subject_alt_names(3) β the gnutls manual, but make it make sense π
okay bestie, sit down, grab your boba π§, because we're about to talk about a little function from the gnutls manual that does exactly one thing and does it iconically. it's giving "quiet luxury" of C APIs. no cap.
β¨ NAME β¨
gnutls_x509_ext_import_subject_alt_names β it's an API function, bestie. that's the whole job description. π
πΈ SYNOPSIS πΈ
#include <gnutls/x509-ext.h>
int gnutls_x509_ext_import_subject_alt_names(const gnutls_datum_t * ext,
gnutls_subject_alt_names_t sans, unsigned int flags);
look at that signature. three args. clean. minimal. main character energy fr fr. π
π ARGUMENTS π
const gnutls_datum_t * extβ this is the DER-encoded extension data. the raw stuff. the lore, if you will. π¦gnutls_subject_alt_names_t sansβ the alternative names. this is where the good stuff lands. πunsigned int flagsβ bestie. it should be zero. that's it. that's the flag situation. don't get cute with it. π«
π DESCRIPTION π
so here's the vibe: this function will export the alternative names that live inside the DER-encoded SubjectAltName PKIX extension you handed it, and it drops them into a gnutls_subject_alt_names_t type. β¨
heads up: sans must be initialized. like, actually initialized. don't come to the function with an uninitialized struct, that's not the move. π
and here's the sweet part β this function will succeed even if there are no subject alternative names in the structure. empty? still slays. still returns success. it's not gonna be dramatic about it. π«Ά
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value. that's the whole story. if it's negative, something went wrong, and that's on the extension data, not on you (probably). π
β SINCE β
3.3.0 β yeah, this one's been around. vintage. iconic. a classic. π
π REPORTING BUGS π
found a bug? spill the tea to the maintainers:
- report bugs to
<bugs@gnutls.org> - home page:
https://www.gnutls.org
they wanna know. fr fr. π
π 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. basically: use it, share it, 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, visit:
https://www.gnutls.org/manual/
iykyk. go read it. it's worth it. πΈ
and that's the whole page, bestie π«Ά this was gnutls version 3.8.13, from the gnutls manual β thanks for reading, you ate that, periodt. π
β¨
π¦ 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