---
name: "libressl-X509V3_extensions_print"
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-X509V3_extensions_print"
---

# libressl-X509V3\_extensions\_print(3)

pretty-print an array of X.509 extensions

## NAME

**X509V3\_extensions\_print** – pretty-print an array of X.509 extensions

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/x509v3.h\>**

*int*\

**X509V3\_extensions\_print**(*BIO \*bio*, *char \*title*, *const STACK\_OF(X509\_EXTENSION) \*sk*, *unsigned long flags*, *int indent*);

## DESCRIPTION

For each member of the variable sized array *sk*, **X509V3\_extensions\_print**() prints the following information to *bio* in the following order:

- The extension type as printed by i2a\_ASN1\_OBJECT(3).

- If the extension is critical, the fixed string "critical".

- A human-readable representation of the data contained in the extension as printed by X509V3\_EXT\_print(3), passing through the *flags*. If that function indicates failure, the BER-encoded data of the extension is dumped with ASN1\_STRING\_print(3) without decoding it first. In both cases, an *indent* incremented by 4 space characters is used.

If *sk* is a NULL pointer or empty, **X509V3\_extensions\_print**() prints nothing and indicates success.

Unless *title* is NULL, it is printed on its own output line before the rest of the output, and *indent* is increased by 4 space characters. This additional global indentation is cumulative to the one applied to individual extensions mentioned above.

## RETURN VALUES

**X509V3\_extensions\_print**() is intended to return 1 on success or 0 if an error occurs.

## SEE ALSO

BIO\_new(3), STACK\_OF(3), X509\_EXTENSION\_get\_critical(3), X509\_get0\_extensions(3), X509\_get\_ext(3), X509V3\_EXT\_print(3)

## HISTORY

**X509V3\_extensions\_print**() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.2.

## BUGS

Many parsing and printing errors are silently ignored, and the function may return indicating success even though *sk* contains invalid data. Even if all the data is valid, success may be indicated  even when the information printed is incomplete for various reasons, for example due to memory allocation failures or I/O errors.
