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 agnutls_x509_crq_ttype, 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 usinggnutls_free(). no leaving it hanging, that's not cute. π«Άunsigned flagsβ zero, orGNUTLS_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 π
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
- 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