shishi_safe_parse(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_safe_parse(3) β€” the shishi girlies' guide πŸ’–

okay so bestie, welcome to the shishi manual, section 3 (that's the library-functions girlies, we're not a command, we're a vibe). this page is all about shishi_safe_parse, and honestly? it's giving "small function, big responsibility". let's get into it 🫢


✨ NAME ✨

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


🌸 SYNOPSIS 🌸

#include <shishi.h>

int shishi_safe_parse(Shishi * handle, FILE * fh, Shishi_asn1 * safe);

yeah she takes three args and gives you back an int. simple. iconic. no cap πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” this is your shishi handle, and you gotta have it allocated by shishi_init() first, okay? no handle, no service. she's the main character here fr fr.
  • FILE * fh β€” a file handle that's open for reading. so like, don't hand her a file you opened for writing, that's not the vibe πŸ™ˆ
  • Shishi_asn1 * safe β€” this one's the output variable, and it comes back holding a newly allocated SAFE. it's a pointer, so she's writing into your thing. she's a giver, lowkey πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this function reads an ASCII armored, DER encoded SAFE from a file, and then populates the variable you gave it. that's it. that's the whole job. she reads, she fills in, she slays ✨

(it's a safe, bestie β€” the file format. she's parsing it out of ASCII armor like unwrapping a little present 🎁)


πŸ’« RETURN VALUE πŸ’«

she returns SHISHI_OK iff successful. and yes, that's a fancy way of saying "only if it worked, bestie". anything else means something went sideways and you should probably check on her 😭


πŸ“ REPORTING BUGS πŸ“

found a bug? do NOT gatekeep it. report bugs to <bug-shishi@gnu.org>. they literally want to hear from you.


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. (translation: share it, remix it, just keep the receipts β€” the copyright notice and this notice β€” attached. that's the whole deal, no strings, no royalty, iconic behaviour 🌈)


πŸ”₯ SEE ALSO πŸ”₯

the full documentation for shishi is maintained as a Texinfo manual. 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 πŸ“–βœ¨


okay that's the whole page bestie!! you just read shishi version 1.0.3, page shishi_safe_parse(3). go forth, parse your SAFEs, and remember: ASCII armored DER encoded files are just data in a cute little outfit πŸŽ€πŸ’– mwah, bye!! πŸ¦‹πŸŒΈ