D2I_X509_CRL(3)

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

πŸ’… D2I_X509_CRL β€” decode & encode X.509 CRLs (section 3 of the manual, bestie)

okay so this page lives in the Library Functions Manual, libcrypto girlie, and it's literally all about turning X.509 certificate revocation lists between DER bytes and structs. twelve functions, one page, we're doing this 🫢


✨ NAME ✨

d2i_X509_CRL, i2d_X509_CRL, d2i_X509_CRL_bio, d2i_X509_CRL_fp, i2d_X509_CRL_bio, i2d_X509_CRL_fp, d2i_X509_CRL_INFO, i2d_X509_CRL_INFO, d2i_X509_REVOKED, i2d_X509_REVOKED β€” decode and encode X.509 certificate revocation lists, no cap 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

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

X509_CRL *
d2i_X509_CRL(X509_CRL **val_out, const unsigned char **der_in,
    long length);

int
i2d_X509_CRL(X509_CRL *val_in, unsigned char **der_out);

X509_CRL *
d2i_X509_CRL_bio(BIO *in_bio, X509_CRL **val_out);

X509_CRL *
d2i_X509_CRL_fp(FILE *in_fp, X509_CRL **val_out);

int
i2d_X509_CRL_bio(BIO *out_bio, X509_CRL *val_in);

int
i2d_X509_CRL_fp(FILE *out_fp, X509_CRL *val_in);

X509_CRL_INFO *
d2i_X509_CRL_INFO(X509_CRL_INFO **val_out, const unsigned char **der_in,
    long length);

int
i2d_X509_CRL_INFO(X509_CRL_INFO *val_in, unsigned char **der_out);

X509_REVOKED *
d2i_X509_REVOKED(X509_REVOKED **val_out, const unsigned char **der_in,
    long length);

int
i2d_X509_REVOKED(X509_REVOKED *val_in, unsigned char **der_out);

πŸ’– DESCRIPTION πŸ’–

so these functions decode and encode X.509 certificate revocation lists. that's the vibe. πŸŽ€

heads up bestie: for the details on semantics, examples, caveats, and bugs, go read ASN1_item_d2i(3). like, actually go read it, i'm not joking πŸ™ˆ
  • d2i_X509_CRL() and i2d_X509_CRL() β€” decode and encode an ASN.1 CertificateList structure defined in RFC 5280 section 5.1. iconic behavior only πŸ’…
  • d2i_X509_CRL_bio(), d2i_X509_CRL_fp(), i2d_X509_CRL_bio(), and i2d_X509_CRL_fp() β€” same energy, except they decode or encode using a BIO or FILE pointer. convenient fr fr ✨
  • d2i_X509_CRL_INFO() and i2d_X509_CRL_INFO() β€” decode and encode an ASN.1 TBSCertList structure defined in RFC 5280 section 5.1 πŸ¦‹
  • d2i_X509_REVOKED() and i2d_X509_REVOKED() β€” decode and encode an ASN.1 structure representing one element of the revokedCertificates field of the ASN.1 TBSCertList structure. just one little guy πŸ”₯

🌈 SEE ALSO 🌈


πŸ‘‘ STANDARDS πŸ‘‘

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile, section 5: CRL and CRL Extensions Profile ⭐


🧚 HISTORY 🧚

a little lore for you bestie, because i KNOW you love a timeline:

  • d2i_X509_CRL(), i2d_X509_CRL(), d2i_X509_CRL_fp(), i2d_X509_CRL_fp(), d2i_X509_CRL_INFO(), i2d_X509_CRL_INFO(), d2i_X509_REVOKED(), and i2d_X509_REVOKED() first appeared in SSLeay 0.5.1 🌱
  • d2i_X509_CRL_bio() and i2d_X509_CRL_bio() first appeared in SSLeay 0.6.0 🌿
  • these functions have been available since OpenBSD 2.4 🌳

mwah πŸ’‹ β€” this page is brought to you by the Debian build of the manual, dated June 8, 2025, and it's D2I_X509_CRL(3) out. go decode something, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from