GNUTLS_X509_CRT_SET_SUBJECT_ALT_NAME(3)
π gnutls_x509_crt_set_subject_alt_name(3) π
okay bestie, so this is a page from the gnutls manual β yes, that gnutls, the TLS library that's literally carrying half the internet on its back π β and today we're talking about setting the subject alternative name on a certificate. it's giving β¨certificate glow-upβ¨ energy. let's get into it.
πΈ NAME πΈ
gnutls_x509_crt_set_subject_alt_name β an API function. no cap, that's the whole name, that's the whole vibe. π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_crt_set_subject_alt_name(gnutls_x509_crt_t crt,
gnutls_x509_subject_alt_name_t type, const void * data, unsigned int
data_size, unsigned int flags);
look at that signature. five arguments. main character energy fr fr. π¦
π«Ά ARGUMENTS π«Ά
gnutls_x509_crt_t crtβ a certificate of typegnutls_x509_crt_t. this is the cert you're about to decorate, bestie πgnutls_x509_subject_alt_name_t typeβ is one of thegnutls_x509_subject_alt_name_tenumerations. pick your fighter, iykyk πconst void * dataβ The data to be set. literally the content, the moment, the whole point πunsigned int data_sizeβ The size of data to be set. gotta tell it how big the vibe is πunsigned int flagsβGNUTLS_FSAN_SETto clear previous data orGNUTLS_FSAN_APPENDto append. so like, fresh start or stack it up, your call π
π DESCRIPTION π
This function will set the subject alternative name certificate extension. periodt. π
It can set the following types:
GNUTLS_SAN_DNSNAMEas a text stringGNUTLS_SAN_RFC822NAMEas a text stringGNUTLS_SAN_URIas a text stringGNUTLS_SAN_IPADDRESSas a binary IP address (4 or 16 bytes) π₯GNUTLS_SAN_OTHERNAME_XMPPas a UTF8 string (since 3.5.0)
Since version 3.5.7 the GNUTLS_SAN_RFC822NAME, GNUTLS_SAN_DNSNAME, and GNUTLS_SAN_OTHERNAME_XMPP are converted to ACE format when necessary. yes bestie, ACE format, automatic, no extra work from you β slay β¨
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so if you see that 0 you ate and left no crumbs π
π¦ SINCE π¦
2.6.0 β a certified classic, been iconic since way back π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>.
Home page: https://www.gnutls.org
not me asking you to actually email the bugs, but like⦠if you find one, pls do 𫢠the maintainers are real ones.
π 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.
π§ 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/
like, go read the whole thing, it's lowkey a masterpiece π
and that's the page, bestie!! this lil writeup came from gnutls 3.8.13, straight out of the manual that lives at gnutls_x509_crt_set_subject_alt_name(3). go set some subject alt names and be your own main character π
πβ¨
π¦ 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