gnutls_x509_crq_set_dn(3)
π gnutls_x509_crq_set_dn β the glow-up your cert request's DN deserves π
okay bestie, so this one lives in the gnutls manual (section 3, the library-call girlies), and it's literally about setting the Distinguished Name on a certificate request. let's go π¦
β¨ NAME β¨
gnutls_x509_crq_set_dn β API function. yes that's it. that's the whole name section. short and iconic π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_crq_set_dn(gnutls_x509_crq_t crq, const char * dn, const
char ** err);
no cap, that's the whole signature. copy it exactly or the compiler will simply not hear you out π
β¨ ARGUMENTS β¨
gnutls_x509_crq_t crqβ a certificate of typegnutls_x509_crq_t. this is your main character, the cert request you're about to give a whole new identity πΈconst char * dnβ a comma separated DN string (RFC4514). yes, RFC4514, the DN string format one, not the other ones. keep it comma-separated or it's giving chaos πconst char ** errβ indicates the error position (if any). so if your DN string is cursed, this lil out-param tells you where it went wrong. extremely helpful, honestly π«Ά
β¨ DESCRIPTION β¨
so this function will set the DN on the provided certificate. π
The input string should be plain ASCII or UTF-8 encoded. like, keep it texty, keep it valid, we love an encoding that behaves.
On DN parsing error GNUTLS_E_PARSING_ERROR is returned. so if you hand it something it can't parse, that's the exact error you're getting back, no mystery, no drama π
β¨ RETURNS β¨
On success, GNUTLS_E_SUCCESS (0) is returned. otherwise a negative error value. and bestie, negative = not it. check your return values, periodt π
fr fr, always check the return value. the function is not gonna text you back about what went wrong. it just returns a negative number and moves on π
β¨ REPORTING BUGS β¨
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. slay, public domain-adjacent energy, we love to see it β
β¨ 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 one's from gnutls version 3.8.13, manpage source gnutls_x509_crq_set_dn(3) β go set some DNs and stay parsed correctly β¨ππ
π¦ 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