GNUTLS_X509_CRT_SET_SUBJECT_ALTERNATIVE_NAME(3)

✨ NAME ✨

gnutls_x509_crt_set_subject_alternative_name β€” bestie, it's literally an API function πŸ’…

(this lil page lives in the gnutls manual, section 3, iykyk)


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_set_subject_alternative_name(gnutls_x509_crt_t crt,
gnutls_x509_subject_alt_name_t type, const char * data_string);

no cap, that's the whole vibe right there πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t crt β€” a certificate of type gnutls_x509_crt_t, so like… the cert u are about to make ✨ more ✨
  • gnutls_x509_subject_alt_name_t type β€” one of the gnutls_x509_subject_alt_name_t enumerations, pick ur fighter πŸ’–
  • const char * data_string β€” the data to be set, and it's a (0) terminated string, meaning it ends when it hits that null, periodt

πŸ’– DESCRIPTION πŸ’–

okay so. this function sets the subject alternative name certificate extension. iconic behavior honestly.

it assumes that the data can be expressed as a null terminated string β€” like, the string just ends at the (0) and that's that, no length argument needed, we love a self-terminating queen πŸŽ€

and ngl, the name of the function is unfortunate since it is inconsistent with gnutls_x509_crt_get_subject_alt_name(). not me side-eyeing the naming committee πŸ’€ it's fine, we move.

if u want more info, go read gnutls_x509_crt_set_subject_alt_name() β€” that's the one to check out for the details 🫢

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned πŸ’– otherwise u get a negative error value, which is the code equivalent of a vibe check fail 😭


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? spill it to <bugs@gnutls.org> bestie, they wanna know fr fr

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. so like, take it, use it, just keep the receipts okay 🫢


🌈 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/

that's the whole page, no crumbs left πŸ’… and for the lil sign-off: this was gnutls 3.8.13, documented on the page that shares its name with gnutls_x509_crt...lternative_name(3) β€” yes the header truncates it, no that's not a typo, that's just how manpages do 😭 bye bestie, go set some SANs πŸ§šπŸ’œ

πŸ“¦ where this page comes from