shishi_asn1_read_inline(3)
π shishi_asn1_read_inline(3) β the shishi manual, bestie edition π¦
okay so. picture this: you're deep in shishi, you've got an ASN.1 node, and you just wanna yoink one little field out of it and drop it into a buffer you already made. that's this function. it's giving "read, but you brought your own bucket." π
β¨ NAME β¨
shishi_asn1_read_inline β an API function, and lowkey the "you handle the memory, I handle the bytes" one πΈ
β¨ SYNOPSIS β¨
#include <shishi.h>
int shishi_asn1_read_inline(Shishi * handle, Shishi_asn1 node, const
char * field, char * data, size_t * datalen);
no cap, that's the whole vibe. π«Ά
β¨ ARGUMENTS β¨
Shishi * handleβ the shishi handle, and you got it fromshishi_init(). it's the main character of every shishi function fr fr π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 the name, babes. πchar * dataβ a pre-allocated output buffer that will hold the ASN.1 field data. pre-allocated, okay? you bring it, this function fills it. πsize_t * datalenβ the multitasking queen: on input it's the maximum size of the output buffer, and on output it's the actual size of the output buffer. glow up mid-call, we love that. β¨
β¨ DESCRIPTION β¨
so what it does: it extracts the data stored in an ASN.1 field and drops it into a fixed size buffer allocated by the caller. that's you. you're the caller. the buffer is your problem. π«‘
β οΈ ngl, because it's genuinely difficult to predict the length of the field, it's often better to use shishi_asn1_read() instead. like, the buffer-based life is not always the move, bestie. consider it. π
β¨ RETURN VALUE β¨
SHISHI_OKβ slayed. it worked. πSHISHI_ASN1_NO_ELEMENTβ the element do not exist π (it's just not there)SHISHI_ASN1_NO_VALUEβ the field has no value, it's giving empty πSHISHI_ASN1_ERRORβ otherwise. something went sideways. π§οΈ
β¨ REPORTING BUGS β¨
found a bug? don't suffer in silence, tell the devs ππ
- 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 queen, royalty-free, as long as you keep the receipts πβ¨)
β¨ 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, the command
info shishi
should give you access to the complete manual. go read it, iykyk ππ
and that's the whole page!! mwah π
this was shishi_asn1_read_inline(3) from the shishi manual, version 1.0.3 β dated, iconic, and available at your local terminal. take care of your buffers, bestie ππ¦
π¦ 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