gnutls_x509_dn_get_str2(3)
β¨ gnutls_x509_dn_get_str2 β¨
okay bestie, welcome to the gnutls manual π this one's a little API function page and it's honestly kind of a bop once you get it. it lives in the gnutls manual, so consider this your group chat with the C library π«Ά
πΈ NAME πΈ
gnutls_x509_dn_get_str2 β literally an API function, that's the whole name, slay π
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_dn_get_str2(gnutls_x509_dn_t dn, gnutls_datum_t * str,
unsigned flags);
π¦ ARGUMENTS π¦
gnutls_x509_dn_t dnβ a pointer to a DN. that's the Distinguished Name we're about to turn into a cute little string β¨gnutls_datum_t * strβ a datum that will hold the name. it's the container, the lil basket the result goes in π§Ίunsigned flagsβ either zero, orGNUTLS_X509_DN_FLAG_COMPAT. pick your vibe, no in-between π
π DESCRIPTION π
so the way this works: this function will allocate a buffer and copy the name from the DN you handed it into that buffer. no cap, it does the memory thing for you π«Ά
the name comes out in the form "C=xxxx,O=yyyy,CN=zzzz", exactly as described in RFC4514. iconic format, we love her π
and the output string will be ASCII or UTF-8 encoded, depending on the certificate data. so like, whatever the cert's been through, the encoding reflects that π
π¨ now listen: when the flag GNUTLS_X509_DN_FLAG_COMPAT is specified, the output format will match the format output by versions of GnuTLS previous to 3.5.6 β which was not fully RFC4514-compliant. so it's the old-school legacy look, not the fully compliant one. choose accordingly, bestie π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned π otherwise you get a negative error value, which is the library's way of saying "not me being dramatic but something went wrong" π
π SINCE π
3.5.7 β she's been around, she's a legend π
π REPORTING BUGS π
found a bug? don't gatekeep, report it to <bugs@gnutls.org> π§
home page: https://www.gnutls.org π
π COPYRIGHT π
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. so like, go forth and share, 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 π
this was gnutls_x509_dn_get_str2(3) from the gnutls manual, version 3.8.13, dated the same. go get that DN string, you're the main character fr fr π¦β¨π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms