shishi_encticketpart_client(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_encticketpart_client ✨

okay bestie, gather round, because we're cracking open a page from the shishi manual (section 3, the library-functions girlies πŸ’…) and it's literally called shishi_encticketpart_client. yes. that's the whole name. it's a lot. we're gonna get through it together 🫢


🌸 NAME 🌸

shishi_encticketpart_client β€” it's an API function, bestie. that's the whole job description. iconic of her honestly πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <shishi.h>

int shishi_encticketpart_client(Shishi * handle, Shishi_asn1
       encticketpart, char ** client, size_t * clientlen);

that's the vibe. one include, one function call, four arguments, zero drama (okay a little drama, there's pointer-to-pointer in there πŸ™ˆ).


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi * handle β€” your Shishi library handle, the one you made with shishi_init(). this is like... your whole Shishi situation. your girl. your home base πŸ’–
  • Shishi_asn1 encticketpart β€” the EncTicketPart variable you wanna pull the client name out of. it's the thing we're reading from, not writing to. hands off, we're just looking ✨
  • char ** client β€” a pointer to a newly allocated zero-terminated string that's gonna hold the principal name. and listen β€” this one may be NULL, and if you do that, it only populates clientlen instead. so you can ask for just the length if that's your thing. no judgment πŸŽ€
  • size_t * clientlen β€” pointer to the length of client on output, and it does not include the terminating zero. also may be NULL, in which case it only populates client. so you got options, queen πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

so what does she do. she represents the client principal name inside an EncTicketPart as a zero-terminated string. that's it. that's the whole thing.

and now the part you actually need to remember, bestie, because this is the part that bites people:

the string is allocated by this function, and it is the responsibility of the caller to deallocate it. so like... you asked for the string, the string is yours now. you free it. no cap, if you leak it that's on you 😭

also note (and this is important, don't skip it): the output length clientlen does not include the terminating zero. so don't go off-by-one-ing yourself, babe πŸ’€


⭐ RETURN VALUE ⭐

returns SHISHI_OK iff successful. that's it. that's the contract. if it's SHISHI_OK, you're slaying. if it isn't... it's not. 🫢


πŸ“ REPORTING BUGS πŸ“

found a bug? first of all, relatable. second of all, report it to <bug-shishi@gnu.org>. πŸ“§

go forth and file, bestie. you're doing great πŸ’œ


Copyright Β© 2002-2022 Simon Josefsson.

and the licensing bit, which we keep exactly as stated: 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. periodt. πŸ’…


🌈 SEE ALSO 🌈

the full documentation for shishi is maintained as a Texinfo manual. so 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 page, bestie!! that was shishi's shishi_encticketpart_client(3), version 1.0.3, straight from the shishi manual. go free your strings and stay hydrated πŸ’–πŸ¦‹πŸŒΈπŸŽ€βœ¨