libressl-d2i_X509_EXTENSION(3)

libressl-d2i_X509_EXTENSION3

Decode and encode x.509 extensions

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/x509.h>

X509_EXTENSION *

d2i_X509_EXTENSION(X509_EXTENSION **val_out, const unsigned char **der_in, long length);

int

i2d_X509_EXTENSION(X509_EXTENSION *val_in, unsigned char **der_out);

X509_EXTENSIONS *

d2i_X509_EXTENSIONS(X509_EXTENSIONS **val_out, const unsigned char **der_in, long length);

int

i2d_X509_EXTENSIONS(X509_EXTENSIONS *val_in, unsigned char **der_out);

Overview

d2i_X509_EXTENSION() and i2d_X509_EXTENSION() decode and encode an ASN.1 Extension structure defined in RFC 5280 section 4.1.

d2i_X509_EXTENSIONS() and i2d_X509_EXTENSIONS() decode and encode an ASN.1 Extensions structure defined in RFC 5280 section 4.1, which is a SEQUENCE OF Extension.

Return values

d2i_X509_EXTENSION() and d2i_X509_EXTENSIONS() return an X509_EXTENSION or X509_EXTENSIONS object, respectively, or NULL if an error occurs.

i2d_X509_EXTENSION() and i2d_X509_EXTENSIONS() return the number of bytes successfully encoded or a negative value if an error occurs.

Standards

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

History

d2i_X509_EXTENSION() and i2d_X509_EXTENSION() first appeared in SSLeay 0.6.2 and have been available since OpenBSD 2.4.

d2i_X509_EXTENSIONS() and i2d_X509_EXTENSIONS() first appeared in OpenSSL 0.9.8h and have been available since OpenBSD 4.5.

From libressl 4.4.0-1 in Arch Linux 2026-11-07. Parsed by carta from the page's mdoc source.