asn1_expand_any_defined_by(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

πŸ’– NAME πŸ’–

asn1_expand_any_defined_by β€” bestie, this is an API function, and it's about to expand your ANYs, no cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libtasn1.h>

int asn1_expand_any_defined_by(asn1_node_const definitions, asn1_node *
element);

🌸 ARGUMENTS 🌸

  • asn1_node_const definitions β€” the ASN1 definitions, like the blueprint of the whole vibe πŸŽ€
  • asn1_node * element β€” a pointer to an ASN1 structure, aka the thing we're about to glow up πŸ’…

✨ DESCRIPTION ✨

Okay so picture this: you've got a structure that came out of a DER decoding process (that's the asn1_der_decoding function, iykyk), and inside it there are "ANY DEFINED BY" elements just sitting there like unopened presents. This function expands every single one of them. Not some. Every. πŸ‘‘

The catch? The element ANY must be defined by an OBJECT IDENTIFIER β€” that's the rule, periodt.

And the type it uses to expand that element ANY is the first one following the definition of the actual value of the OBJECT IDENTIFIER. So it's not guessing, it's reading the room and picking the next thing in line. Slay. πŸ”₯


🌈 RETURNS 🌈

  • ASN1_SUCCESS β€” substitution OK, we ate, no crumbs πŸ’–
  • ASN1_ERROR_TYPE_ANY β€” some "ANY DEFINED BY" element could not be expanded because there was a problem in the OBJECT ID -> TYPE association 😭 like the link-up just didn't happen
  • other error codes β€” depending on DER decoding, because sometimes the DER decoding itself is the one acting up πŸ’€

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, go forth and share, 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 whole page, bestie πŸ’œ this was libtasn1 version 4.21.0, from the asn1_expand_any_defined_by(3) era β€” catch you in the next manpage, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from