gnutls_x509_cr...t_othername_oid(3)
π gnutls_x509_crq_get_subject_alt_othername_oid(3) π
okay bestie, welcome to the gnutls manual, section 3 π. This one's a whole function deep-dive and honestly it's giving "certificate request archaeology" and I'm obsessed.
β¨ NAME β¨
gnutls_x509_crq_get_subject_alt_othername_oid β it's an API function, bestie. That's the whole name, no notes. π
πΈ SYNOPSIS πΈ
okay so first you gotta pull in the header, like this:
#include <gnutls/x509.h>
and then the actual call, look at her:
int gnutls_x509_crq_get_subject_alt_othername_oid(gnutls_x509_crq_t crq,
unsigned int seq, void * ret, size_t * ret_size);
four args, one int coming back. she's tidy. she's iconic. π¦
π ARGUMENTS π
gnutls_x509_crq_t crqβ should contain agnutls_x509_crq_ttype. that's the certificate request you're digging through, no cap.unsigned int seqβ specifies the sequence number of the alt name (0for the first one,1for the second etc.). zero-indexed, like a real one π .void * retβ is the place where the otherName OID will be copied to. it's the destination, the lil landing spot, the home for your OID π β¨size_t * ret_sizeβ holds the size ofret. so like, how much room your destination has. important. do not skip her. π«Ά
π DESCRIPTION π
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.
lowkey important: This function is only useful ifgnutls_x509_crq_get_subject_alt_name()returnedGNUTLS_SAN_OTHERNAME. like, if it didn't, you're knocking on the wrong door bestie π
π₯ 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. so like, if she knows the OID she'll give you the fancy specific name, and if she doesn't she just goes GNUTLS_SAN_OTHERNAME and shrugs π€·βοΈ
It will return GNUTLS_E_SHORT_MEMORY_BUFFER if ret_size is not large enough to hold the value. In that case ret_size will be updated with the required size. so she's not gonna just fail silently β she tells you exactly how much room you should've given her. queen behaviour π
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. it's just not there, babe. π
π¦ SINCE π¦
2.8.0 β she's been around since 2.8.0, an elder. respect her. πβοΈ
π 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/
and that's the whole page, bestie!! π
β¨ this was gnutls version 3.8.13, and we read it together, which is basically a friendship bracelet at this point π«Άπ no cap, go read your certificate requests, love u, bye π
π¦ 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