X509_REVOKED_NEW(3)
π 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 emptyX509_REVOKEDobject. This object represents one of the elements of therevokedCertificatesfield of the ASN.1TBSCertListstructure defined in RFC 5280 section 5.1. It is used byX509_CRLobjects 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 ofr. not a shallow vibe, a whole deep copy πX509_REVOKED_free()β freesr. cleanup era π§X509_REVOKED_set_serialNumber()β sets the serial number ofrtoserial. The suppliedserialpointer 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 ofrtotm. The suppliedtmpointer 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 newX509_REVOKEDobject if successful; otherwiseNULLis returned and an error code can be retrieved withERR_get_error(3).X509_REVOKED_dup()β returns the newX509_REVOKEDobject orNULLif an error occurs. In some cases of failure, the reason can be determined withERR_get_error(3).X509_REVOKED_get0_serialNumber()β returns an internal pointer to the serial number ofr.X509_REVOKED_get0_revocationDate()β returns an internal pointer to the revocation date ofr.X509_REVOKED_set_serialNumber()andX509_REVOKED_set_revocationDate()β return1for success or0for failure. In some cases of failure, the reason can be determined withERR_get_error(3).
π¦ SEE ALSO π¦
d2i_X509_CRL(3)PEM_read_X509_CRL(3)X509_CRL_get0_by_serial(3)X509_CRL_new(3)X509_CRL_print(3)X509_EXTENSION_new(3)X509_REVOKED_get_ext(3)X509_REVOKED_get_ext_d2i(3)
π 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()andX509_REVOKED_free()first appeared in SSLeay 0.4.4 and have been available since OpenBSD 2.4.X509_REVOKED_set_serialNumber()andX509_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()andX509_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
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
- Copyright (c) 2015 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms