GNUTLS_X509_CRT_GET_ISSUER_ALT_NAME2(3)
π gnutls_x509_crt_get_issuer_alt_name2 π
okay bestie, sit DOWN, because we're doing a gnutls manpage and it's from the gnutls manual, section 3. this one's about pulling the issuer alternative name out of an X.509 cert. it's giving very specific, very niche, very iconic. let's go π
β¨ NAME β¨
gnutls_x509_crt_get_issuer_alt_name2 β it's an API function, no cap π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_get_issuer_alt_name2(gnutls_x509_crt_t cert,
unsigned int seq, void * ian, size_t * ian_size, unsigned int *
ian_type, unsigned int * critical);
like yes, that's a lot of arguments. we'll get through them together, i promise π
π¦ ARGUMENTS π¦
gnutls_x509_crt_t certβ should contain agnutls_x509_crt_ttype. that's the cert you're interrogating, bestie πunsigned int seqβ specifies the sequence number of the alt name.0for the first one,1for the second etc. so it's zero-indexed, obviously, we love a zero-indexed queen πvoid * ianβ is the place where the alternative name will be copied to. that's the destination buffer, the little home where the name goes πsize_t * ian_sizeβ holds the size ofret. (yes it saysret, that's just how it is, we don't question the ancestors π)unsigned int * ian_typeβ holds the type of the alternative name, and that type is one ofgnutls_x509_subject_alt_name_tπunsigned int * criticalβ will be non-zero if the extension is marked as critical. it may be null, so you can absolutely pass nothing here if you don't care, no pressure β¨
π DESCRIPTION π
so this function will return the alternative names, contained in the given certificate. it's literally the same as gnutls_x509_crt_get_issuer_alt_name() β same energy, same vibe β except for the fact that it will return the type of the alternative name in ian_type even if the function fails for some reason (i.e. the buffer provided is not enough). that's the whole glow-up right there. she tells you the type no matter what. main character behaviour, honestly π
β RETURNS β
it returns the alternative issuer name type on success, one of the enumerated gnutls_x509_subject_alt_name_t. slay.
and then the plot twists:
- it will return
GNUTLS_E_SHORT_MEMORY_BUFFERifian_sizeis not large enough to hold the value. in that caseian_sizewill be updated with the required size β so it's actually being helpful, it's telling you how much room you need π«Ά - if the certificate does not have an Alternative name with the specified sequence number, then
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEis returned. nothing there, bestie, the data said "not available" and meant it π
π§ SINCE π§
2.10.0 β old money, been here since forever, respect the elders π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
(pls be nice when you email them, they're doing their best π₯Ί)
π 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. so like, share it, remix it, it's free, 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/
ok that's the whole page, every option, every return code, every copyright line, untouched. facts preserved, vibe elevated. that's the rule π
and that's a wrap, babe πΈ this was gnutls 3.8.13, page gnutls_x509_crt...ssuer_alt_name2(3) β go forth and read your issuer alt names responsibly. mwah π
β¨
π¦ 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