gnutls_subject_alt_names_get(3)

✨ gnutls_subject_alt_names_get(3) β€” the gnutls manual's lil' bestie πŸ’–

okay bestie, gather round 🫢 this is a page straight out of the gnutls manual, version 3.8.13, and it's all about grabbing one single subject alternative name out of a whole little collection of them. yes, one. at a time. we're being ✨specific✨.


🌸 NAME 🌸

gnutls_subject_alt_names_get β€” an API function, and it's giving "let me fetch that alt name for you, queen" πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509-ext.h>

int gnutls_subject_alt_names_get(gnutls_subject_alt_names_t sans,
       unsigned int seq, unsigned int * san_type, gnutls_datum_t * san,
       gnutls_datum_t * othername_oid);

like, there it is. five whole arguments. she's thorough πŸ’œ


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_subject_alt_names_t sans β€” the alternative names, the whole squad of them, the main character collection itself πŸ‘‘
  • unsigned int seq β€” the index of the name to get, aka which one in the lineup you're pointing at πŸ”’
  • unsigned int * san_type β€” this is where the type of the name gets dropped off, and yes, the type is "of gnutls_subject_alt_names_t" 🏷️
  • gnutls_datum_t * san β€” the alternative name data itself. heads up bestie: this should be treated as constant πŸ”’
  • gnutls_datum_t * othername_oid β€” the object identifier, but only if san_type is GNUTLS_SAN_OTHERNAME. also should be treated as constant πŸ”’

🌈 DESCRIPTION 🌈

so the way this works is, this function returns a specific alternative name, exactly as it's stored in the sans type. one name. the one you asked for with your index. no cap πŸ’…

and here's the part you can't skip, bestie: the returned values should be treated as constant and they're only valid for the lifetime of sans. so don't go holding onto them after sans dips, okay? they're not sticking around 😭 periodt.


⭐ RETURNS ⭐

  • when it eats: GNUTLS_E_SUCCESS (0) is returned πŸŽ‰
  • when you asked for an index that doesn't exist: GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE β€” out of bounds, bestie, she's not there πŸ™ˆ
  • otherwise: a negative error value πŸ’€

🧚 SINCE 🧚

3.3.0 β€” she's been iconic for a minute πŸŽ€


πŸ’œ REPORTING BUGS πŸ’œ

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


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. slay, and also legally binding, but mostly slay πŸ’…


🌟 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 a vibe, iykyk πŸ“šβœ¨


and that's the page, bestie 🫢 written under the gnutls name, version 3.8.13, for the gnutls_subject_alt_names_get(3) manual entry. go get your alt names, you absolute legend πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from