BIO_f_prefix(3ssl)

BIO_f_prefix3ssl

Prefix bio filter

Usage

 #include <openssl/bio.h>
 const BIO_METHOD *BIO_f_prefix(void);
 long BIO_set_prefix(BIO *b, const char *prefix);
 long BIO_set_indent(BIO *b, long indent);
 long BIO_get_indent(BIO *b);

Overview

BIO_f_cipher() returns the prefix BIO method. This is a filter for text output, where each line gets automatically prefixed and indented according to user input.

The prefix and the indentation are combined. For each line of output going through this filter, the prefix is output first, then the amount of additional spaces indicated by the indentation, and then the line itself.

By default, there is no prefix, and indentation is set to 0.

BIO_set_prefix() sets the prefix to be used for future lines of text, using prefix. prefix may be NULL, signifying that there should be no prefix. If prefix isn't NULL, this function makes a copy of it.

BIO_set_indent() sets the indentation to be used for future lines of text, using indent. Negative values are not allowed.

BIO_get_indent() gets the current indentation.

Notes

BIO_set_prefix(), BIO_set_indent() and BIO_get_indent() are implemented as macros.

Return values

BIO_f_prefix() returns the prefix BIO method.

BIO_set_prefix() returns 1 if the prefix was correctly set, or <=0 on failure.

BIO_set_indent() returns 1 if the prefix was correctly set, or <=0 on failure.

BIO_get_indent() returns the current indentation, or a negative value for failure.

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

History

BIO_get_indent(), BIO_set_indent(), BIO_set_prefix() were added in OpenSSL 3.0.

From openssl 3.6.5-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.