shishi_asn1_read(3)
π shishi_asn1_read π
okay bestie, welcome to the shishi manual page for shishi_asn1_read(3) β yes it's a section 3 page, yes it's the shishi library, and yes we are gonna read it together like it's a group chat at 2am π¦
β¨ NAME β¨
shishi_asn1_read β it's an API function, that's literally the whole name, no notes π
πΈ SYNOPSIS πΈ
#include <shishi.h>
int shishi_asn1_read(Shishi * handle, Shishi_asn1 node, const char *
field, char ** data, size_t * datalen);
there she is. the function. iconic. π
π ARGUMENTS π
Shishi * handleβ your shishi handle, the one you got fromshishi_init(). it's giving main character energy, everything needs it.Shishi_asn1 nodeβ the ASN.1 variable you're reading a field from. the source. the origin story.const char * fieldβ the name of the field insidenodethat you wanna read. just tell it the name, it'll go find it.char ** dataβ a newly allocated output buffer that will hold the ASN.1 field data. yes, newly allocated β you didn't make this, it made it for you π«Άsize_t * datalenβ the actual size of that output buffer. the receipts, basically.
π« DESCRIPTION π«
so what it does: it extracts the data stored in an ASN.1 field and drops it into a newly allocated buffer. that's the vibe. that's the whole job. slay.
and here's the lil detail you do NOT wanna miss, bestie: the buffer will always be zero terminated β always, no cap. but datalen will not include that added zero. so like, the zero is there, it's just not counted. do not let that zero sneak into your length math, fr fr. π
β RETURN VALUE β
SHISHI_OKβ we ate. everything worked, successful, periodt. πSHISHI_ASN1_NO_ELEMENTβ the element does not exist. it's not there. it ghosted you. πSHISHI_ASN1_NO_VALUEβ the field exists but it has no value. it's giving empty. π«SHISHI_ASN1_ERRORβ anything else went wrong, so like, otherwise. that's the catch-all, iykyk.
π REPORTING BUGS π
found a bug? not me being the one to tell you, but β report bugs to <bug-shishi@gnu.org>. π
GNU Shishi home page: http://www.gnu.org/software/shishi/
General help using GNU software: http://www.gnu.org/gethelp/
π COPYRIGHT π
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. (yes bestie, keep the notice. it's the rules. respect the rules. π )
π 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. go read it, it's lowkey a whole experience. πβ¨
and that's the page!! this was shishi_asn1_read(3) from shishi version 1.0.3 β mwah, go read some ASN.1, you got this ππ¦π
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms