---
name: "libressl-d2i_X509_CRL"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-d2i_X509_CRL"
---

# libressl-d2i\_X509\_CRL(3)

decode and encode X.509 certificate revocation lists

## 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

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#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

These functions decode and encode X.509 certificate revocation lists. For details about the semantics, examples, caveats, and bugs, see ASN1\_item\_d2i(3).

**d2i\_X509\_CRL**() and **i2d\_X509\_CRL**() decode and encode an ASN.1 *CertificateList* structure defined in RFC 5280 section 5.1.

**d2i\_X509\_CRL\_bio**(), **d2i\_X509\_CRL\_fp**(), **i2d\_X509\_CRL\_bio**(), and **i2d\_X509\_CRL\_fp**() are similar except that they decode or encode using a *BIO* or *FILE* pointer.

**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.

## SEE ALSO

ASN1\_item\_d2i(3), X509\_CRL\_new(3), X509\_REVOKED\_new(3)

## STANDARDS

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

## HISTORY

**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.
