gnutls_x509_cr...issuer_alt_name(3)
β¨ NAME β¨
gnutls_x509_crt_get_issuer_alt_name β bestie, this is an API function and it's literally here to pull the issuer alt name out of a cert π
This one lives in the gnutls manual, and it's giving very much "I read X509v3 extensions for breakfast" energy, no cap.
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_get_issuer_alt_name(gnutls_x509_crt_t cert, unsigned
int seq, void * ian, size_t * ian_size, unsigned int * critical);
π ARGUMENTS π
gnutls_x509_crt_t certβ should contain agnutls_x509_crt_ttype. Like, that's the whole vibe of this arg π«Άunsigned int seqβ specifies the sequence number of the alt name (0for the first one,1for the second etc.). Yeah bestie, you gotta count from zero, it's giving very programmer of them.void * ianβ is the place where the alternative name will be copied to. It's the lil landing spot β¨size_t * ian_sizeβ holds the size ofian.unsigned int * criticalβ will be non-zero if the extension is marked as critical (may be null). So you can totally passNULLhere if you don't care, no judgement π
π DESCRIPTION π
Okay so, this function retrieves the Issuer Alternative Name (2.5.29.18), contained in the given certificate in the X509v3 Certificate Extensions. Iconic. Periodt.
When the SAN type is otherName, it will extract the data in the otherName's value field, and GNUTLS_SAN_OTHERNAME is returned. You may use gnutls_x509_crt_get_subject_alt_othername_oid() to get the corresponding OID and the "virtual" SAN types (e.g., GNUTLS_SAN_OTHERNAME_XMPP). iykyk π
If an otherName OID is known, the data will be decoded. Otherwise the returned data will be DER encoded, and you will have to decode it yourself π fr fr, that one's on you. Currently, only the RFC 3920 id-on-xmppAddr Issuer AltName is recognized.
π« RETURNS π«
It returns the alternative issuer name type on success β one of the enumerated gnutls_x509_subject_alt_name_t π
It will return GNUTLS_E_SHORT_MEMORY_BUFFER if ian_size is not large enough to hold the value. In that case ian_size will be updated with the required size. So like, it's not a fail, it's a glow-up notice π
If the certificate does not have an Alternative name with the specified sequence number then GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
β SINCE β
2.10.0 β old money, honestly. Been serving looks since forever π
π¦ REPORTING BUGS π¦
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
Not me asking you to actually report the bugs instead of just complaining in the group chat π they wanna hear it 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.
π§ 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/
And that's the whole page, bestie β this was the gnutls manual, version 3.8.13, and yeah the title is a whole mouthful (gnutls_x509_cr...issuer_alt_name(3), they truncated it, tragic) but we got there πβ¨π slay, go read your certs responsibly π«Ά
π¦ 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