asn1_get_length_ber(3)
π asn1_get_length_ber(3) π
okay bestie, pull up a chair, because we're about to talk about libtasn1's little length-field gremlin, asn1_get_length_ber. yes this is a real manpage from the libtasn1 family and yes it's gonna be cute. let's go π¦
β¨ NAME β¨
asn1_get_length_ber β an API function, no cap π
πΈ SYNOPSIS πΈ
#include <libtasn1.h>
long asn1_get_length_ber(const unsigned char * ber, int ber_len, int *
len);
literally three args and one long return. she's simple, she's iconic, she slays π
π«Ά ARGUMENTS π«Ά
const unsigned char * berβ the BER data you wanna decode. this is the snack, hand it over πint ber_lenβ how long that BER data is. gotta tell her the size bestie, she's not psychic πint * lenβ an output variable, and she's gonna fill it with the length of the BER length field. she writes back, we love a responsive queen β¨
π DESCRIPTION π
so here's the vibe: you extract a length field from BER data. simple. gorgeous. main character energy.
but the difference from asn1_get_length_der() is the whole plot twist, so listen up: this function will return a length even if the value has indefinite encoding. that's the whole point. that's her thing. periodt π
π₯ RETURNS π₯
she returns the decoded length value, bestie. gorgeous. immaculate. π
but β and this is the dramatic part β she returns a negative value when the value was too big. so check your return value, don't get caught lacking π
β SINCE β
2.0 β she's been here since 2.0, an OG, a legend, a foundational icon π
π 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. (translation: be free, 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/
like, go read it, iykyk ππ«Ά
and that's the whole page babes!! π this was asn1_get_length_ber(3) from libtasn1, version 4.21.0. mwah, go decode something gorgeous π
β¨ππ¦
π¦ 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