X509_REVOKED_NEW(3)

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

πŸ’… X509_REVOKED_NEW(3) β€” create, change, and inspect an X.509 CRL revoked entry

okay so bestie, welcome to the X509_REVOKED_NEW(3) page from the Library Functions Manual β€” yes, the manual name is folded right in here like a little name tag instead of copied as a header line. This is the whole squad for one X.509 CRL revoked entry: making it, copying it, freeing it, reading its serial number and revocation date, and setting those two cuties. ✨


🌸 NAME 🌸

X509_REVOKED_new, X509_REVOKED_dup, X509_REVOKED_free, X509_REVOKED_get0_serialNumber, X509_REVOKED_get0_revocationDate, X509_REVOKED_set_serialNumber, X509_REVOKED_set_revocationDate β€” create, change, and inspect an X.509 CRL revoked entry.

🫢 SYNOPSIS 🫢

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

X509_REVOKED *
X509_REVOKED_new(void);

X509_REVOKED *
X509_REVOKED_dup(X509_REVOKED *r);

void
X509_REVOKED_free(X509_REVOKED *r);

const ASN1_INTEGER *
X509_REVOKED_get0_serialNumber(const X509_REVOKED *r);

const ASN1_TIME *
X509_REVOKED_get0_revocationDate(const X509_REVOKED *r);

int
X509_REVOKED_set_serialNumber(X509_REVOKED *r, ASN1_INTEGER *serial);

int
X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);

✨ DESCRIPTION ✨

okay so here’s the tea, no cap β€” these functions are all about handling one little revoked-entry object in a CRL. πŸŽ€

  • X509_REVOKED_new() β€” allocates and initializes an empty X509_REVOKED object. This object represents one of the elements of the revokedCertificates field of the ASN.1 TBSCertList structure defined in RFC 5280 section 5.1. It is used by X509_CRL objects and can hold information about one revoked certificate including issuer names, serial number, revocation date, and revocation reason. iconic little container, honestly πŸ¦‹
  • X509_REVOKED_dup() β€” creates a deep copy of r. not a shallow vibe, a whole deep copy πŸ’–
  • X509_REVOKED_free() β€” frees r. cleanup era 🧚
  • X509_REVOKED_set_serialNumber() β€” sets the serial number of r to serial. The supplied serial pointer is not used internally, so it should be freed up after use. important bestie note: you still own that pointer ⭐
  • X509_REVOKED_set_revocationDate() β€” sets the revocation date of r to tm. The supplied tm pointer is not used internally, so it should be freed up after use. same deal: free it up after use 🌸

πŸ’– RETURN VALUES πŸ’–

  • X509_REVOKED_new() β€” returns the new X509_REVOKED object if successful; otherwise NULL is returned and an error code can be retrieved with ERR_get_error(3).
  • X509_REVOKED_dup() β€” returns the new X509_REVOKED object or NULL if an error occurs. In some cases of failure, the reason can be determined with ERR_get_error(3).
  • X509_REVOKED_get0_serialNumber() β€” returns an internal pointer to the serial number of r.
  • X509_REVOKED_get0_revocationDate() β€” returns an internal pointer to the revocation date of r.
  • X509_REVOKED_set_serialNumber() and X509_REVOKED_set_revocationDate() β€” return 1 for success or 0 for failure. In some cases of failure, the reason can be determined with ERR_get_error(3).

πŸ¦‹ SEE ALSO πŸ¦‹

🌈 STANDARDS 🌈

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

πŸ‘‘ HISTORY πŸ‘‘

  • X509_REVOKED_new() and X509_REVOKED_free() first appeared in SSLeay 0.4.4 and have been available since OpenBSD 2.4.
  • X509_REVOKED_set_serialNumber() and X509_REVOKED_set_revocationDate() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2.
  • X509_REVOKED_dup() first appeared in OpenSSL 1.0.2.
  • X509_REVOKED_get0_serialNumber() and X509_REVOKED_get0_revocationDate() first appeared in OpenSSL 1.1.0. These functions have been available since OpenBSD 6.3.

mwah πŸ’‹ β€” this page is from the Debian edition of the X509_REVOKED_NEW(3) manual, dated June 8, 2025. periodt. πŸ’…

πŸ“¦ where this page comes from