gnutls_subject_alt_names_set(3)

✨ gnutls_subject_alt_names_set(3) ✨

okay bestie, so this one lives in the gnutls manual, and it's literally all about stuffing a Subject Alternative Name into a little SAN container. let's get into it πŸ’–


πŸŽ€ NAME πŸŽ€

gnutls_subject_alt_names_set β€” it's an API function, bestie. that's the whole name. no notes. πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_subject_alt_names_set(gnutls_subject_alt_names_t sans,
       unsigned int san_type, const gnutls_datum_t * san, const char *
       othername_oid);

like, look at her. four args. she's serving. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_subject_alt_names_t sans β€” the alternative names container itself. the little handbag where we're putting the name πŸ‘œ
  • unsigned int san_type β€” the type of the name, and yes it's one of the gnutls_subject_alt_names_t types. it's giving "what flavour of name are we doing today" 🌈
  • const gnutls_datum_t * san β€” the actual alternative name data. the content, the moment, the girl herself ✨
  • const char * othername_oid β€” the object identifier, but ONLY if san_type is GNUTLS_SAN_OTHERNAME. otherwise she's just vibing in the corner, not being used πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so this function will store the specified alternative name in the sans. that's it. that's the job. she puts the name in the bag. iconic behaviour, no cap 🫢

and here's the lil glow-up: since version 3.5.7, the GNUTLS_SAN_RFC822NAME, GNUTLS_SAN_DNSNAME, and GNUTLS_SAN_OTHERNAME_XMPP get converted to ACE format when necessary. so if it needs converting, bestie, it gets converted. periodt. πŸ’…


⭐ RETURNS ⭐

on success you get GNUTLS_E_SUCCESS which is 0 β€” slay! πŸŽ‰

otherwise you get a negative error value. so like, if the number is negative, something went wrong, and you should probably go look at it 😭


🌈 SINCE 🌈

3.3.0 β€” she's been around. an elder. a legend. a founding mother πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

found a bug? don't be shy, tell the girlies:

they wanna hear it fr fr πŸ›


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.

(translation: you can copy and share this file however you want, no royalty needed, just keep the copyright notice and this notice with it. we love a permissive queen πŸ’–)


πŸ”₯ 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, go visit:

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

like, the whole manual is right there. go read it. it's giving comprehensive πŸ“š


and that's the page, bestie!! this was gnutls 3.8.13, and honestly the date situation is a lil mysterious on this one but the version is right there and she's serving. mwah πŸ’‹ go set some SANs, you absolute legend πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from