asn1_get_object_id_der(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_get_object_id_der β€” from the libtasn1 manual, section 3 πŸŽ€

okay so bestie, you know how ASN.1 has these little dotted-number thingies that identify, like, everything? yeah. this function is the one that takes the DER-encoded version and hands you back the cute textual form. it's giving translator energy ✨


🌸 NAME 🌸

asn1_get_object_id_der β€” API function. that's it, that's the name, she's an API function and she's iconic for it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libtasn1.h>

int asn1_get_object_id_der(const unsigned char * der, int der_len, int *
ret_len, char * str, int str_size);

yes the * on ret_len really does wrap to the next line like that in the original, we don't fix what isn't broken, periodt 🫢


🌈 ARGUMENTS 🌈

  • const unsigned char * der β€” the DER data you wanna decode, and it's gotta contain the OBJECT IDENTIFIER. like, that's the whole point of it being there, no cap.
  • int der_len β€” how long that DER data is that you're decoding. the length. of the DER. πŸ’€
  • int * ret_len β€” an output variable, and it's gonna hold the length of the DER data. so she's an out-param, she reports back, main character energy honestly.
  • char * str β€” a pre-allocated output buffer where the textual object id goes. pre-allocated!! you gotta make room for her yourself, she is not doing it for you bestie 😭
  • int str_size β€” the length of that pre-allocated output buffer. match it to str or perish.

✨ DESCRIPTION ✨

So. asn1_get_object_id_der converts a DER encoded object identifier to its textual form. that's the vibe. 🌸

⚠️ and this is the important bit, do NOT skip it: this function expects the DER object identifier without the tag. no tag. zero tag. she does not want the tag, she will not handle the tag. leave it at home 🚫

πŸ‘‘ RETURNS πŸ‘‘

ASN1_SUCCESS on success, or an error. slay when it works, sad when it doesn't, that's just how it goes πŸ’œ


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, just keep the notice, that's the whole deal 🫢)


πŸ”₯ 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/

okay that's the whole page, mwah πŸ’‹ this was libtasn1 version 4.21.0, and the page itself is dated for the libtasn1 4.21.0 era, asn1_get_object_id_der(3) β€” go decode something cute bestie, ily, bye πŸ¦‹πŸ’–

πŸ“¦ where this page comes from