gnutls_x509_crt_set_dn(3)

πŸ’– gnutls_x509_crt_set_dn(3) πŸ’–

okay so bestie, welcome to the gnutls manual, page for gnutls_x509_crt_set_dn. this one's a lil function that gives your certificate a whole identity β€” a DN, a Distinguished Name, the whole ✨who even are you✨ of the cert world. let's get into it 🫢


🌸 NAME 🌸

gnutls_x509_crt_set_dn β€” API function. yes that's it, that's the name, she's literally just an API function and she's serving πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_set_dn(gnutls_x509_crt_t crt, const char * dn, const
char ** err);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t crt β€” a certificate of type gnutls_x509_crt_t. this is the cert you're about to glow up ✨
  • const char * dn β€” a comma separated DN string (RFC4514). so like, the whole vibe of who this cert is, in one lil comma-separated string 🌸
  • const char ** err β€” indicates the error position (if any). if the parsing goes sideways, she'll point at where it went sideways πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

This function will set the DN on the provided certificate. periodt, that's the job πŸ‘‘

The input string should be plain ASCII or UTF-8 encoded. no weird encodings bestie, keep it clean. and if the DN parsing trips up, you get GNUTLS_E_PARSING_ERROR back. not a vibe, but at least it tells you 😭

Note that DNs are not expected to hold DNS information, and thus no automatic IDNA conversions are attempted when using this function. so like, don't be putting a whole domain in there and expecting magic. If that is required (e.g., store a domain in CN), process the corresponding input with gnutls_idna_map(). that's the function for that job, iykyk πŸ’œ

🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. zero means slay, negative means go check err and cry a lil πŸ₯²


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being the bug reporter πŸ’… Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org


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. fr fr, take 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 visit

https://www.gnutls.org/manual/


and that's the whole page bestie!! this was gnutls_x509_crt_set_dn(3) from gnutls version 3.8.13 β€” go forth and name your certificates, mwah πŸ’–πŸ’…βœ¨

πŸ“¦ where this page comes from