shishi_asn1_to_der(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ shishi_asn1_to_der ✨

okay bestie, welcome to the shishi manual page for shishi_asn1_to_der(3) β€” yes she's a section 3 function, yes she's iconic, let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

shishi_asn1_to_der β€” an API function. that's it, that's the whole name, she's serving function energy ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <shishi.h>

int shishi_asn1_to_der(Shishi * handle, Shishi_asn1 node, char ** der,
       size_t * len);

like, that's the whole thing. four args, one int coming back at you. no cap. 🌸


πŸ’– ARGUMENTS πŸ’–

  • Shishi * handle β€” the shishi handle, babes. you get one from shishi_init(), and if you don't have one, what are you even doing here 😭
  • Shishi_asn1 node β€” the actual ASN.1 data you want turned into DER. this is the main character of the operation, ngl.
  • char ** der β€” an output array that holds the DER encoding of node. she gets filled in for you, so make sure you're passing a pointer she can write into 🫢
  • size_t * len β€” an output variable that gets the length of the der output array. so you know exactly how much you got, periodt.

🌈 DESCRIPTION 🌈

so basically: this function extracts a newly allocated DER representation of the ASN.1 data you specified. that's the vibe. it hands you a fresh DER encoding of your node, allocated and ready to go ✨

not me emphasizing newly allocated β€” yes bestie, you're responsible for that memory, she's yours now πŸ’€

⭐ RETURN VALUE ⭐

  • returns SHISHI_OK when everything slays βœ…
  • returns SHISHI_ASN1_ERROR when the DER encoding fails 😭 β€” and the common reason for that is the ASN.1 is missing required values. so if you're getting errors, go check your fields, fr fr.

πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, tell the people 🫢


Copyright Β© 2002-2022 Simon Josefsson.

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: she's free, just keep the receipts, bestie πŸ’œ)


🌸 SEE ALSO 🌸

the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. iykyk πŸ“–βœ¨


and that's the whole page, angel πŸ’– this beauty lives in the shishi manual, version 1.0.3, filed under shishi_asn1_to_der(3) β€” mwah, go encode something, you got this πŸŽ€πŸ¦‹β­