asn1_der_decoding2(3)
π NAME π
asn1_der_decoding2 β it's an API function, bestie, and it's about to eat
β¨ SYNOPSIS β¨
#include <libtasn1.h>
int asn1_der_decoding2(asn1_node * element, const void * ider, int *
max_ider_len, unsigned int flags, char * errorDescription);
π ARGUMENTS π
asn1_node * elementβ okay so this is a pointer to an ASN1 structure. like, the thing you're filling up. the vessel. the main character π«Άconst void * iderβ the vector that's holding the DER encoding. your raw bytes, your source material, your moment πint * max_ider_lenβ pointer to an integer that tells you the max number of bytes that* ideris allowed to take up. and here's the cute part: the real size of the DER encoding gets handed back to you through this same pointer. she's giving in and out, versatility, iconic. β¨unsigned int flagsβ the flags that control how the function behaves. the vibe-setters. no cap.char * errorDescriptionβ a null-terminated string that holds the details when something went wrong π. your little note explaining the drama.
πΈ DESCRIPTION πΈ
So basically: fill the structure * element with values from a DER encoding string. simple, clean, gorgeous. π
β οΈ but listen β the structure has to have just been created with asn1_create_element(). brand new. fresh out the box. don't come in here with a used structure, that's not the move. π
If the ASN1_DECODE_FLAG_ALLOW_PADDING flag is set, then the function will straight up ignore padding after the decoded DER data. and once it returns successfully, * max_ider_len gets set to the number of bytes decoded. cute, informative, we love a receipt. π§Ύβ¨
If the ASN1_DECODE_FLAG_STRICT_DER flag is set, then the function will not decode any BER-encoded elements. nope. not today. strict means strict, periodt. π
π₯ RETURNS π₯
ASN1_SUCCESSβ when the DER encoding is OK. slay, ate, no notes. πASN1_ELEMENT_NOT_FOUNDβ whenELEMENTisNULL. yeah... that's on you bestie πASN1_TAG_ERRORorASN1_DER_ERRORβ when the DER encoding doesn't match the structure name. and heads up:* ELEMENTgets deleted in that case. gone. reduced to atoms. π
π COPYRIGHT π
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. fr fr, that's the whole deal β no royalty, just keep the notice. π
π 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, then this command:
info libtasn1
should give you access to the complete manual. iykyk π¦
Or, as an alternative, you can obtain the manual from:
https://www.gnu.org/software/libtasn1/manual/
and that's the whole page, bestie π«Ά this one came to you from libtasn1 version 4.21.0, dated with love, signed off as asn1_der_decoding2(3) β mwah π
π
π¦ where this page comes from
- alpine 3.22: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- alpine 3.23: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- alpine 3.24: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- arch rolling: libtasn1 4.21.0-1 Β· GPL-3.0-or-later AND LGPL-2.1-or-later AND GFDL-1.3-or-later
- fedora 43: libtasn1-devel 4.21.0-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: libtasn1-devel 4.21.0-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: libtasn1-devel 4.21.0-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: libtasn1-devel 4.21.0-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- ubuntu resolute: libtasn1-6-dev 4.21.0-2
- ubuntu stonking: libtasn1-6-dev 4.21.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms