gnutls_x509_crq_get_dn2(3)
π gnutls_x509_crq_get_dn2 β the manual page, but make it cute
okay bestie, sit down, hydrate, and let's talk about gnutls_x509_crq_get_dn2(3) from the gnutls manual. it's an API function, it's lowkey iconic, and it's about to hand you a certificate request's name on a little silver platter. π
β¨ NAME β¨
gnutls_x509_crq_get_dn2 β API function. that's it, that's the name, no notes. π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crq_get_dn2(gnutls_x509_crq_t crq, gnutls_datum_t * dn);
look at her. two params, one int return, zero drama. slay. β¨
π¦ ARGUMENTS π¦
gnutls_x509_crq_t crqβ should contain agnutls_x509_crq_ttype. so like, an actual certificate request handle, bestie, not vibes. πgnutls_datum_t * dnβ a pointer to a structure to hold the name. important: it must be freed usinggnutls_free(). do NOT forget this. memory leaks are not the vibe. π
π DESCRIPTION π
so what does this function actually do? it will allocate a buffer and copy the name of the Certificate request into it. yes, allocate β meaning it's doing the memory management homework for you (which is exactly why you owe it a gnutls_free() later, iykyk π«Ά).
the name comes out looking like this:
C=xxxx,O=yyyy,CN=zzzz
as described in RFC4514. cute, right? and the output string will be ASCII or UTF-8 encoded, depending on the certificate data. so it's giving whatever energy the cert brought with it. π
β οΈ okay real talk, this function does not output a fully RFC4514 compliant string. if that's what you need, go see gnutls_x509_crq_get_dn3() instead. no hard feelings, she's just built different. π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise a negative error value. and a negative error code on error. so basically: zero = we ate π, negative = we did not eat π.
π§ SINCE π§
3.1.10 β a classic, been here since forever, main character energy from day one. π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the girlies:
- report bugs 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. (translation: share it, remix it, 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, go visit:
https://www.gnutls.org/manual/
that's the whole treasure map, bestie. πΊοΈβ¨
and that's a wrap on the gnutls_x509_crq_get_dn2(3) page, brought to you by gnutls 3.8.13 β the gnutls manual, page gnutls_x509_crq_get_dn2(3). go free your gnutls_datum_t, drink some water, and remember: you are the main character of your own memory management. periodt. ππ¦π
π¦ 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