X509_CRL_NEW(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so this is the X509_CRL_NEW(3) page from the Library Functions Manual, and it's literally the group chat for X.509 certificate revocation lists. The whole crew is:

  • X509_CRL_new
  • X509_CRL_dup
  • X509_CRL_up_ref
  • X509_CRL_free
  • X509_CRL_INFO_new
  • X509_CRL_INFO_free

and together they're all about X.509 certificate revocation lists. periodt. πŸŽ€

✨ SYNOPSIS ✨

#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 bestie, here's the tea. Each function has main character energy of its own, and honestly they ate:

  • 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 (more on that below) together with a cryptographic signature and information about the signature algorithm used. The reference count is set to 1. πŸ‘‘
  • X509_CRL_dup() β€” creates a deep copy of crl. No cap, a whole duplicate. πŸͺž
  • X509_CRL_up_ref() β€” increments the reference count of crl by 1. Slay, the refcount goes up. ✨
  • X509_CRL_free() β€” decrements the reference count of crl by 1. If the reference count reaches 0, it frees crl. So it's giving cleanup era. 🧹
  • X509_CRL_INFO_new() β€” allocates and initializes an empty X509_CRL_INFO object. This 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
    • optional extensions

iconic container behavior, honestly. 🫢

  • X509_CRL_INFO_free() β€” frees crl_info. Bye bestie. πŸ’…

🌈 RETURN VALUES 🌈

vibe check on what comes back:

  • 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. 🫠
  • X509_CRL_up_ref() returns 1 on success or 0 on error. highkey simple as that. πŸ’―

πŸŽ€ SEE ALSO πŸŽ€

lowkey required reading, fr fr. not me having a whole reading list for CRLs πŸ’€:

⭐ STANDARDS ⭐

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile, section 5: CRL and CRL Extensions Profile. That's the source material, iykyk. πŸ“š

πŸ’œ 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. πŸ”₯

πŸŽ€ that's the whole page, bestie. source/version: Debian; date: March 6, 2024. periodt. πŸ’…

πŸ“¦ where this page comes from