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 typegnutls_x509_crt_t, so likeβ¦ the cert u are about to make β¨ more β¨gnutls_x509_subject_alt_name_t typeβ one of thegnutls_x509_subject_alt_name_tenumerations, 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 π
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
- 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