asn1_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_object_id_der(3) πŸ’–

okay bestie, so this is a page from libtasn1 β€” the manual name is literally asn1_object_id_der(3) and it's giving extremely niche but very slay energy. it's an API function. let's get into it 🫢


✨ SYNOPSIS ✨

#include <libtasn1.h>

int asn1_object_id_der(const char * str, unsigned char * der, int *
der_len, unsigned flags);

like, it takes four things and returns an int. that's the whole vibe. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * str β€” your object identifier, but make it numeric, dot format. so like, dots and numbers, bestie, not vibes.
  • unsigned char * der β€” the buffer where the returned encoding goes. and get this: it may be NULL. yes queen, optional. πŸ‘‘
  • int * der_len β€” starts out as the size of der, and then it gets updated to hold the final size. it's a glow-up arc, honestly. ✨
  • unsigned flags β€” must be zero. that's it. zero. no notes. don't be quirky with it. πŸ™ˆ

🌸 DESCRIPTION 🌸

Creates the DER encoding of the object identifier you handed it. that's the whole thing. it makes the encoding. DER. of the OID. iconic behaviour, truly. πŸ’–


⭐ RETURNS ⭐

so it can come back as a few different things, and you need to know which:

  • ASN1_SUCCESS β€” yay! the DER encoding was OK. we love this for you. πŸŽ‰
  • ASN1_VALUE_NOT_VALID β€” the str you passed is not a valid OID. tragic. check your dots. 😭
  • ASN1_MEM_ERROR β€” the der vector isn't big enough. and listen, this one's actually useful: in this case, der_len will contain the length needed. so it's telling you exactly how much room to give it next time. a helpful king. πŸ‘‘

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.


🌈 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/

ngl, flags must be zero. that's not a suggestion, bestie. that's the rule. πŸ’€

and that's the page, fr fr πŸ¦‹ this one's from libtasn1, version 4.21.0 β€” go forth and encode your object identifiers responsibly, you absolute main character. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from