D2I_X509_ALGOR(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’– NAME πŸ’–

okay so bestie, this is the d2i_X509_ALGOR(3) page from libcrypto, and it's lowkey iconic ✨. It covers d2i_X509_ALGOR, i2d_X509_ALGOR, d2i_X509_ALGORS, and i2d_X509_ALGORS β€” literally the decode-and-encode squad for algorithm identifiers πŸ’….

πŸŽ€ SYNOPSIS πŸŽ€

library β€œlibcrypto” #include <openssl/x509.h>

X509_ALGOR *
d2i_X509_ALGOR(X509_ALGOR **val_out, const unsigned char **der_in,
    long length);

int
i2d_X509_ALGOR(X509_ALGOR *val_in, unsigned char **der_out);

X509_ALGORS *
d2i_X509_ALGORS(X509_ALGORS **val_out, const unsigned char **der_in,
    long length);

int
i2d_X509_ALGORS(X509_ALGORS *val_in, unsigned char **der_out);

🌸 DESCRIPTION 🌸

d2i_X509_ALGOR() and i2d_X509_ALGOR() decode and encode an ASN.1 AlgorithmIdentifier structure β€” the one defined in RFC 5280 section 4.1.1.2, periodt. πŸ¦‹

d2i_X509_ALGORS() and i2d_X509_ALGORS() do the same thing but for an ASN.1 sequence of AlgorithmIdentifier structures. And the data type X509_ALGORS is defined as STACK_OF(X509_ALGOR) β€” that's the whole definition, no cap πŸ’….

For all the details about semantics, examples, caveats, and bugs, go read ASN1_item_d2i(3) β€” bestie, that's where the fine print lives. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

🌈 STANDARDS 🌈

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile ✨

⭐ HISTORY ⭐

  • d2i_X509_ALGOR() and i2d_X509_ALGOR() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.
  • d2i_X509_ALGORS() and i2d_X509_ALGORS() first appeared in OpenSSL 0.9.8h and have been available since OpenBSD 4.5.

xoxo, this page is from Debian and it's dated June 8, 2025 β€” slay, bye! πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from