gnutls_x509_rdn_get2(3)

πŸ’– gnutls_x509_rdn_get2 β€” the gnutls girlies' guide πŸ’–

okay so bestie, we're in the gnutls manual, and today's main character is gnutls_x509_rdn_get2(3). it's giving "let me turn that raw DER into a name you can actually read" and honestly? obsessed. πŸŽ€


✨ NAME ✨

gnutls_x509_rdn_get2 β€” API function πŸ¦‹


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_rdn_get2(const gnutls_datum_t * idn, gnutls_datum_t *
str, unsigned flags);

✨ ARGUMENTS ✨

  • const gnutls_datum_t * idn β€” this one is supposed to hold a DER encoded RDN sequence, no cap. that's the raw material, the whole vibe before the glow-up. πŸ’…
  • gnutls_datum_t * str β€” a datum that's gonna hold the name. it's the little container where the pretty output lives. 🫢
  • unsigned flags β€” zero, or GNUTLS_X509_DN_FLAG_COMPAT. pick your fighter. ⭐

✨ DESCRIPTION ✨

so this function literally returns 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 formatting, honestly. 🌸

but wait β€” when the flag GNUTLS_X509_DN_FLAG_COMPAT is specified, the output format will match the format output by previous to 3.5.6 versions of GnuTLS, which was not not fully RFC4514-compliant. it's the nostalgia mode, the throwback edition. πŸ’€

✨ RETURNS ✨

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

or… GNUTLS_E_SHORT_MEMORY_BUFFER gets returned and * buf_size is updated if the provided buffer is not long enough. like girl, your buffer is too small, we fixed the number for you, try again. 😭

otherwise, a negative error value. and that's the villain arc. 🚩


✨ REPORTING BUGS ✨

found a bug? spill it to <bugs@gnutls.org>. πŸ“§

home page: https://www.gnutls.org β€” go say hi. 🏠


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. free as in do whatever, just keep the receipts. 🧾✨


✨ 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. mwah. πŸ’œ

this was gnutls version 3.8.13, manual page gnutls_x509_rdn_get2(3) β€” thanks for reading my little yap session, ily, go read your DER. πŸŽ€βœ¨

πŸ“¦ where this page comes from