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 a gnutls_x509_crt_t type. that's literally the whole job of this one bestie, it's a cert and it holds a gnutls_x509_crt_t type πŸ™ˆ
  • unsigned int seq β€” specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.). yes queen, we're indexing from zero, that's just how it is πŸ¦‹
  • void * oid β€” is the place where the otherName OID will be copied to ✨
  • size_t * oid_size β€” holds the size of ret.

🌸 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 Β© 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 the gnutls manual, section 3, version 3.8.13, page gnutls_x509_cr...t_othername_oid(3) β€” mwah, go read it, iykyk πŸ’…πŸ’–βœ¨πŸ¦‹πŸŒΈ
πŸ“¦ where this page comes from