GNUTLS_X509_CRT_GET_ISSUER_ALT_OTHERNAME_OID(3)

πŸ’– gnutls_x509_crt_get_issuer_alt_othername_oid(3) πŸ’–

okay bestie, welcome to the gnutls manual, this one's a whole API function and honestly it's giving "cryptic but iconic" πŸ’… it lives in the gnutls section of the man pages and it's about digging an OID out of a certificate's issuer alt name. no cap.


✨ NAME ✨

gnutls_x509_crt_get_issuer_alt_othername_oid β€” an API function, fr fr πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_issuer_alt_othername_oid(gnutls_x509_crt_t cert,
unsigned int seq, void * ret, size_t * ret_size);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crt_t cert β€” bestie this should contain a gnutls_x509_crt_t type, that's literally the vibe it needs to have.
  • unsigned int seq β€” which alt name we're talking about, by sequence number (0 for the first one, 1 for the second etc., you know the drill ✨).
  • void * ret β€” the place where the otherName OID will be copied to. it's the destination, the moment, the main character spot πŸ‘‘
  • size_t * ret_size β€” holds the size of ret. it's the receipts πŸ“

πŸ’œ DESCRIPTION πŸ’œ

So this function will extract the type OID of an otherName Subject Alternative Name contained in the given certificate, and it returns the type as an enumerated element. periodt.

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. (yes, that's exactly what it says, we don't make the rules πŸ’€)

This function is only useful if gnutls_x509_crt_get_issuer_alt_name() returned GNUTLS_SAN_OTHERNAME. if it didn't, you're lowkey in the wrong place bestie πŸ™ˆ

πŸ”₯ RETURNS πŸ”₯

On success you get the alternative issuer name type, one of the enumerated gnutls_x509_subject_alt_name_t β€” slay. 🌈

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.

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 it's not a fail, it's a glow-up moment, it's telling you how much room it needs πŸ’…

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. not me getting rejected by a cert 😭


⭐ SINCE ⭐

2.10.0 β€” an elder, an OG, we respect her 🫢


πŸŽ€ REPORTING BUGS πŸŽ€

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org


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 3.8.13, brought to you by the gnutls girlies β€” go read the docs, hydrate, and may your buffers always be big enough 🧚✨

πŸ“¦ where this page comes from