gnutls_x509_cr...t_othername_oid(3)
π NAME π
gnutls_x509_crt_get_subject_alt_othername_oid β it's an API function, bestie, and yes we're reading the gnutls manual (section 3, the library calls girlies) together π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_crt_get_subject_alt_othername_oid(gnutls_x509_crt_t
cert, unsigned int seq, void * oid, size_t * oid_size);
π ARGUMENTS π
gnutls_x509_crt_t certβ should contain agnutls_x509_crt_ttype. that's literally the whole job of this one bestie, it's a cert and it holds agnutls_x509_crt_ttype πunsigned int seqβ specifies the sequence number of the alt name (0for the first one,1for the second etc.). yes queen, we're indexing from zero, that's just how it is π¦void * oidβ is the place where theotherNameOID will be copied to β¨size_t * oid_sizeβ holds the size ofret.
πΈ DESCRIPTION πΈ
okay so this function will extract the type OID of an otherName Subject Alternative Name, contained in the given certificate, and return the type as an enumerated element. it's giving "tell me what kind of otherName we're dealing with" π
This function is only useful if gnutls_x509_crt_get_subject_alt_name() returned GNUTLS_SAN_OTHERNAME. like, that's the vibe check. if it didn't return that, this call isn't your moment bestie π
If oid is null then only the size will be filled. The oid returned will be null terminated, although oid_size will not account for the trailing null. no cap β the null terminator is there, it's just not counted π«Ά
π RETURNS π
the alternative subject name type on success, one of the enumerated gnutls_x509_subject_alt_name_t. For supported OIDs, it will return one of the virtual (GNUTLS_SAN_OTHERNAME_*) types, e.g. GNUTLS_SAN_OTHERNAME_XMPP, and GNUTLS_SAN_OTHERNAME for unknown OIDs. lowkey iconic behavior honestly π
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 tells you how much room you need, which is very main character of it β¨
If the certificate does not have an Alternative name with the specified sequence number and with the otherName type then GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned. nothing there bestie, it's not you, the cert just doesn't have it π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
π 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/
not me reading the whole manual and still being obsessed π this is thegnutlsmanual, section 3, version3.8.13, pagegnutls_x509_cr...t_othername_oid(3)β mwah, go read it, iykyk π πβ¨π¦πΈ
π¦ 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