gnutls_x509_crq_get_dn3(3)

πŸ’… gnutls_x509_crq_get_dn3(3) β€” the gnutls manual, bestie edition

okay so you're in the gnutls manual and this page is about pulling the name out of a certificate request. yes, the whole distinguished-name thing. it's giving ✨identity reveal✨ and honestly? slay.


✨ NAME ✨

gnutls_x509_crq_get_dn3 β€” API function 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_crq_get_dn3(gnutls_x509_crq_t crq, gnutls_datum_t * dn,
unsigned flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crq_t crq β€” this one should contain a gnutls_x509_crq_t type, bestie. that's the vibe check it has to pass. πŸ’–
  • gnutls_datum_t * dn β€” a pointer to a structure that's gonna hold the name. heads up: you must free it using gnutls_free(). no leaving it hanging, that's not cute. 🫢
  • unsigned flags β€” zero, or GNUTLS_X509_DN_FLAG_COMPAT. pick your fighter. ✨

🌈 DESCRIPTION 🌈

so what does this actually do. this function will allocate a buffer and copy the name of the Certificate request into it. iconique behaviour, honestly.

the name comes out looking like "C=xxxx,O=yyyy,CN=zzzz" β€” exactly as described in RFC4514. the output string will be ASCII or UTF-8 encoded, depending on whatever the certificate data is doing. no cap. πŸ’œ

and when you pass the GNUTLS_X509_DN_FLAG_COMPAT flag? the output format will match the format that previous to 3.5.6 versions of GnuTLS output. lowkey important note: that old format was not fully RFC4514-compliant. (the original really said "not not" β€” we're being normal about it πŸ™ˆ). so like, compat mode = old-school vibes, not strictly the standard. use accordingly. πŸ‘‘


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value. and a negative error code on error. yeah. it said it twice. dramatic but valid. πŸ’€


🌸 SINCE 🌸

3.5.7 β€” she's been around. a legacy queen. πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report it 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. periodt. πŸ’…


🧚 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 lil masterpiece lives in the gnutls manual, source/version 3.8.13, filed under gnutls_x509_crq_get_dn3(3). go get that distinguished name, you absolute main character. πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from