gnutls_x509_crq_get_dn(3)
β¨ gnutls_x509_crq_get_dn β¨
okay so this is a page from the gnutls manual (we're on version 3.8.13 bestie, keep up π
) and it's all about pulling the subject name out of a certificate request. sit down, get comfy, we're doing this π«Ά
πΈ NAME πΈ
gnutls_x509_crq_get_dn β literally just an API function, no cap π
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crq_get_dn(gnutls_x509_crq_t crq, char * buf, size_t *
buf_size);
π¦ ARGUMENTS π¦
gnutls_x509_crq_t crqβ this one should contain agnutls_x509_crq_ttype. that's the whole vibe, it's the cert request you're snooping on πchar * bufβ a pointer to a structure that's gonna hold the name. and yes, it may beNULL, iconic behaviour fr frsize_t * buf_sizeβ at first this holds the size ofbuf. it's like the lil container that tells you how much room you've got π
π DESCRIPTION π
so what does this actually do? it copies the name of the Certificate request subject into the buffer you handed it. that's it, that's the function, she's simple and she slays β¨
the name comes out looking like this:
"C=xxxx,O=yyyy,CN=zzzz"
which is exactly the form described in RFC 2253, periodt.
the output string buf will be ASCII or UTF-8 encoded, depending on whatever the certificate data is feeling that day π
β οΈ important caveat bestie: this function does not output a fully RFC4514 compliant string. if that's what you need, go see gnutls_x509_crq_get_dn3() instead. different function, different energy π
π₯ RETURNS π₯
GNUTLS_E_SHORT_MEMORY_BUFFERβ you get this when the buffer you provided isn't long enough π and in that case,* buf_sizegets updated with the required size (so like, she's telling you how much room she actually needs, helpful queen π)0β success!! we ate. π
π REPORTING BUGS π
found a bug? don't be shy, tell the gnutls 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.
(no gatekeeping here, the license is giving generous π«Ά)
π 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 3.8.13, the gnutls_x509_crq_get_dn(3) page β go read your cert requests, mwah π
π¦ 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