D2I_ASN1_SEQUENCE_ANY(3)
π
D2I_ASN1_SEQUENCE_ANY(3) bestie era π
okay so welcome to the D2I_ASN1_SEQUENCE_ANY(3) page from the Library Functions Manual, where weβre literally decoding and encoding ASN.1 sequences and sets. no cap, this is the whole squadβs page. π¦β¨
β¨ NAME β¨
d2i_ASN1_SEQUENCE_ANY,i2d_ASN1_SEQUENCE_ANY,d2i_ASN1_SET_ANY,i2d_ASN1_SET_ANYβ decode and encode ASN.1 sequences and sets
π SYNOPSIS π
library βlibcryptoβ #include <openssl/asn1.h>
ASN1_SEQUENCE_ANY *
d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **val_out,
const unsigned char **der_in, long length);
int
i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *val_in,
unsigned char **der_out);
ASN1_SEQUENCE_ANY *
d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **val_out,
const unsigned char **der_in, long length);
int
i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *val_in,
unsigned char **der_out);
π DESCRIPTION π
These functions decode and encode ASN.1 sequences and sets, which are also represented by the V_ASN1_SEQUENCE and V_ASN1_SET type identifier constants, respectively. yes, respectively matters, bestie. π
For the full semantics, examples, caveats, and bugs, please go read ASN1_item_d2i(3) β thatβs where the details live. π
The type ASN1_SEQUENCE_ANY is defined as STACK_OF(ASN1_TYPE). and hereβs the lowkey important bit: whether such an object represents a sequence or a set is not stored in the object itself β it needs to be remembered separately. not me reminding you, but likeβ¦ remember it separately, fr fr. π
Like for d2i_ASN1_TYPE(3) and i2d_ASN1_TYPE(3), the type of the individual values contained in the sequence or set is not specified when calling the functions. It might vary among the members, and it is stored together with each value in each ASN1_TYPE object contained in the sequence or set. periodt. π
β¨
πΈ RETURN VALUES πΈ
d2i_ASN1_SEQUENCE_ANY()β returns anASN1_SEQUENCE_ANYobject orNULLif an error occurs.i2d_ASN1_SEQUENCE_ANY()β returns the number of bytes written or a negative value if an error occurs.
π¦ SEE ALSO π¦
π HISTORY π
d2i_ASN1_SEQUENCE_ANY(), i2d_ASN1_SEQUENCE_ANY(), d2i_ASN1_SET_ANY(), and i2d_ASN1_SET_ANY() first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9. iconic behavior, honestly. β
xoxo, your Debian girlie β source/version: Debian, date: June 8, 2025, mwah πβ¨
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2017, 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms