gnutls_x509_rdn_get(3)

πŸ’– gnutls_x509_rdn_get β€” bestie, let's read a name πŸ’–

okay so this is a page from the gnutls manual, and the star of the show is gnutls_x509_rdn_get. it's giving "please just tell me who this certificate belongs to" energy and honestly? same. πŸŽ€


✨ NAME ✨

gnutls_x509_rdn_get β€” it's an API function, periodt. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_rdn_get(const gnutls_datum_t * idn, char * buf, size_t *
buf_size);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * idn β€” this one should contain a DER encoded RDN sequence. yes bestie, DER, not vibes. πŸ™ˆ
  • char * buf β€” a pointer to a structure that's gonna hold the peer's name. it's the little home where the name moves in. 🏠
  • size_t * buf_size β€” holds the size of buf. it's the measuring tape, and it also gets updated. πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so this function will return the name of the given RDN sequence. the name comes out looking like "C=xxxx,O=yyyy,CN=zzzz", exactly as described in RFC4514. iconic format, no notes. ✨

heads up bestie: this function does not output a fully RFC4514 compliant string. if that's what you need, go see gnutls_x509_rdn_get2() instead. different function, different slay. πŸ’€

🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) is returned. simple. clean. we love her. 🫢

but if the buffer you handed over isn't long enough? you get GNUTLS_E_SHORT_MEMORY_BUFFER back, and * buf_size gets updated for you β€” so it's literally telling you "give me more room, bestie." 😭

otherwise you get a negative error value. not the main character moment we wanted, ngl. πŸ’”


πŸŽ€ REPORTING BUGS πŸŽ€

found something cursed? 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. fr fr, that's the whole deal. πŸ’–


⭐ 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_x509_rdn_get(3) from gnutls version 3.8.13. go read a certificate name, you've totally got this. mwah. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from