asn1_read_tag(3)

πŸ“¦
version 4.21.0 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– asn1_read_tag β€” the libtasn1 glow-up πŸ’–

okay bestie, so you're deep in libtasn1 land and you need to peek at the TAG and the CLASS of one lil' element hiding inside a structure?? say less. this is the function. it's giving "I know exactly what that element is" energy and honestly? obsessed. πŸ¦‹


✨ NAME ✨

asn1_read_tag β€” an API function, periodt. πŸ’…


🌸 SYNOPSIS 🌸

#include <libtasn1.h>

int asn1_read_tag(asn1_node_const root, const char * name, int *
tagValue, int * classValue);

πŸŽ€ ARGUMENTS πŸŽ€

  • asn1_node_const root β€” a pointer to a structure. your whole little world, basically. πŸ‘‘
  • const char * name β€” the name of the element inside a structure. like calling your friend by name in the group chat, fr fr. πŸ’¬
  • int * tagValue β€” the variable that will contain the TAG value. it gets ✨filled in✨ for you.
  • int * classValue β€” the variable that will specify the TAG type. also getting filled in, we love a generous function. 🫢

🌈 DESCRIPTION 🌈

so what does it actually do? it returns the TAG and the CLASS of one element inside a structure. that's the whole vibe check. 🧚

and the CLASS? it can be one of these constants, no cap:

  • ASN1_CLASS_APPLICATION
  • ASN1_CLASS_UNIVERSAL
  • ASN1_CLASS_PRIVATE
  • ASN1_CLASS_CONTEXT_SPECIFIC

those four. that's the whole roster. iconic lineup honestly. πŸ’œ


⭐ RETURNS ⭐

  • ASN1_SUCCESS β€” if successful. we ate. πŸ”₯
  • ASN1_ELEMENT_NOT_FOUND β€” if name is not a valid element. 😭 not me passing a name that doesn't even exist…

Copyright Β© 2006-2025 Free Software Foundation, Inc..

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, that means you can share it, just keep the receipts. πŸ“)


πŸ’€ SEE ALSO πŸ’€

The full documentation for libtasn1 is maintained as a Texinfo manual. If the info and libtasn1 programs are properly installed at your site, the command

info libtasn1

should give you access to the complete manual. As an alternative you may obtain the manual from:

https://www.gnu.org/software/libtasn1/manual/

and that's the tea. πŸ“ this whole page is libtasn1 4.21.0 energy, asn1_read_tag(3), and it lives in the manual forever and ever. go read some tags, bestie β€” you've got this. mwah. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from