shishi_principal_name_realm(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_principal_name_realm(3) πŸ’–

okay bestie, so this is a page from the shishi manual (section 3, the library-call girlies πŸ’…), and it's all about one little function: shishi_principal_name_realm. yes it's a long name. yes she ate. let's get into it 🫢


✨ NAME ✨

shishi_principal_name_realm β€” an API function, periodt. that's literally her whole job description πŸ“›


🌸 SYNOPSIS 🌸

like, the actual way you summon her:

#include <shishi.h>

int shishi_principal_name_realm(Shishi * handle, Shishi_asn1 namenode,
const char * namefield, Shishi_asn1 realmnode, const char * realmfield,
char ** out, size_t * outlen);

πŸŽ€ ARGUMENTS πŸŽ€

okay so she takes seven things and every single one matters, no skipping πŸ™ˆ

  • Shishi * handle β€” the Shishi library handle, and you get her from shishi_init(). she's the main character, everything runs through her πŸ‘‘
  • Shishi_asn1 namenode β€” an ASN.1 structure that's holding the principal name in namefield.
  • const char * namefield β€” the name of the field inside namenode where the principal name is chillin'.
  • Shishi_asn1 realmnode β€” an ASN.1 structure holding the principal realm in realmfield.
  • const char * realmfield β€” the name of the field inside realmnode where the principal realm is at.
  • char ** out β€” pointer to a freshly allocated, null-terminated string with the principal name in it. she can be NULL if you only wanna populate outlen (lowkey iconic behaviour).
  • size_t * outlen β€” pointer to the length of out on output, and nope, that does not count the terminating null. also may be NULL if you only wanna populate out. balanced queen βš–οΈ

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: she takes the principal name and the realm, both living all cozy inside an ASN.1 structure, and represents them as a null-terminated string. cute, right? πŸ“

the string? this function allocates it. which means it's your responsibility as the caller to deallocate it β€” she made it, you clean it up, that's the deal bestie 😭

also heads up: the output length outlen does not include that terminating null character. do not forget. i'm literally begging πŸ™

⭐ RETURN VALUE ⭐

returns SHISHI_OK if successful. slay. that's the whole vibe check βœ…


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being the bearer of bad news but β€” report it to <bug-shishi@gnu.org>.


Copyright Β© 2002-2022 Simon Josefsson.

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. (fr fr, just keep the receipts 🧾)


🌈 SEE ALSO 🌈

the full documentation for shishi lives in a Texinfo manual β€” very ✨archival✨ of them. if the info and shishi programs are properly installed at your site, this command:

info shishi

should give you access to the complete manual. iykyk πŸ’œ


and that's the whole page, bestie!! this was shishi version 1.0.3, page shishi_principal_name_realm(3) β€” go forth and deallocate your strings, mwah πŸ’…βœ¨