X509_CRL_NEW(3)

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

🌸 NAME 🌸

Bestie, welcome to X509_CRL_NEW(3) β€” a Library Functions Manual page about X.509 certificate revocation lists. The whole squad is here: X509_CRL_new, X509_CRL_dup, X509_CRL_up_ref, X509_CRL_free, X509_CRL_INFO_new, X509_CRL_INFO_free β€” X.509 certificate revocation lists, periodt πŸ’…βœ¨


✨ SYNOPSIS ✨

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

X509_CRL *
X509_CRL_new(void);

X509_CRL *
X509_CRL_dup(X509_CRL *crl);

int
X509_CRL_up_ref(X509_CRL *crl);

void
X509_CRL_free(X509_CRL *crl);

X509_CRL_INFO *
X509_CRL_INFO_new(void);

void
X509_CRL_INFO_free(X509_CRL_INFO *crl_info);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this is the CRL corner of the library, and it’s lowkey iconic. Here’s the whole vibe, function by function:

  • X509_CRL_new() β€” allocates and initializes an empty X509_CRL object. That object represents an ASN.1 CertificateList structure defined in RFC 5280 section 5.1. It can hold a pointer to an X509_CRL_INFO object discussed below, together with a cryptographic signature and information about the signature algorithm used. The reference count is set to 1. Fresh out the box, reference count one, main character energy ✨
  • X509_CRL_dup() β€” creates a deep copy of crl. Not a little shallow situation, bestie: deep copy πŸ”₯
  • X509_CRL_up_ref() β€” increments the reference count of crl by 1. It’s giving β€œmore people are holding onto this now” πŸ’–
  • X509_CRL_free() β€” decrements the reference count of crl by 1. If the reference count reaches 0, it frees crl. Bye bestie, only when the count says so 🫢
  • X509_CRL_INFO_new() β€” allocates and initializes an empty X509_CRL_INFO object. That one represents an ASN.1 TBSCertList structure defined in RFC 5280 section 5.1. It is used inside the X509_CRL object and can hold a list of revoked certificates, an issuer name, the time the list was issued, the time when the next update of the list is due, and optional extensions. So much info, so much structure πŸŽ€
  • X509_CRL_INFO_free() β€” frees crl_info. Cleanup queen behavior 🧚

πŸ’œ RETURN VALUES πŸ’œ

  • X509_CRL_new(), X509_CRL_dup(), and X509_CRL_INFO_new() return the new X509_CRL or X509_CRL_INFO object, respectively, or NULL if an error occurs. No object? NULL. That’s the whole mood 😭
  • X509_CRL_up_ref() returns 1 on success or 0 on error. Simple. Clean. Slay πŸ’…

🌈 SEE ALSO 🌈

Go read these next, iykyk:


⭐ STANDARDS ⭐

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile, section 5: CRL and CRL Extensions Profile. Standards moment, but make it cute πŸ“šβœ¨


πŸŽ€ HISTORY πŸŽ€

  • X509_CRL_new(), X509_CRL_free(), X509_CRL_INFO_new(), and X509_CRL_INFO_free() first appeared in SSLeay 0.4.4.
  • X509_CRL_dup() first appeared in SSLeay 0.5.1.
  • These functions have been available since OpenBSD 2.4.
  • X509_CRL_up_ref() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3.

Ancient lore, honestly. We love a documented origin story πŸ‘‘πŸ’€

Cute sign-off from the Debian footer: June 8, 2025, manual page X509_CRL_NEW(3) β€” bye bestie, stay revoked and unbothered πŸŽ€πŸ’–

πŸ“¦ where this page comes from