gnutls_x509_rdn_get_by_oid(3)

✨ gnutls_x509_rdn_get_by_oid ✨

okay bestie, welcome to the gnutls manual, this one's a lil X.509 baddie πŸ’–


🌸 NAME 🌸

gnutls_x509_rdn_get_by_oid β€” literally just an API function, that's the whole name, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_rdn_get_by_oid(const gnutls_datum_t * idn, const char *
oid, unsigned indx, unsigned int raw_flag, void * buf, size_t *
buf_size);

she takes six arguments and she's not sorry about it 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * idn β€” this should contain a DER encoded RDN sequence. that's the vibe she's working with, periodt.
  • const char * oid β€” an Object Identifier. yes, an OID. iykyk.
  • unsigned indx β€” if you've got multiple same OIDs chilling in the RDN, this lil number says which one to send. use 0 for the first one, that's the default energy. ⭐
  • unsigned int raw_flag β€” if this is non-zero then the raw DER data are returned. raw. unprocessed. iconic. πŸ”₯
  • void * buf β€” a pointer to a structure to hold the peer's name. it's giving storage. it's giving "put the name here please". πŸŽ€
  • size_t * buf_size β€” holds the size of buf. she's the measuring tape bestie, don't forget her. πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so this function will return the name of the given Object identifier, of the RDN sequence. the name gets encoded using the rules from RFC4514. that's it, that's the whole function, she's simple and she slays ✨


🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) is returned. slay. πŸŽ‰

BUT. if the provided buffer is not long enough, you get GNUTLS_E_SHORT_MEMORY_BUFFER and * buf_size gets updated for you (she's being helpful, not mean πŸ₯Ί).

otherwise you get a negative error value. not the vibe. πŸ’€


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't suffer in silence bestie, report it:


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.

(translation: use it, share it, just keep the receipts, we're not asking for money πŸ’–)


🌟 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, documenting gnutls_x509_rdn_get_by_oid(3), with copyright vibes stretching from 2001 all the way to 2023. go forth and parse those RDNs, you absolute main character πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from