xref: /freebsd/crypto/openssl/doc/man3/BIO_f_prefix.pod (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1=pod
2
3=head1 NAME
4
5BIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent
6- prefix BIO filter
7
8=head1 SYNOPSIS
9
10 #include <openssl/bio.h>
11
12 const BIO_METHOD *BIO_f_prefix(void);
13 long BIO_set_prefix(BIO *b, const char *prefix);
14 long BIO_set_indent(BIO *b, long indent);
15 long BIO_get_indent(BIO *b);
16
17=head1 DESCRIPTION
18
19BIO_f_cipher() returns the prefix BIO method. This is a filter for
20text output, where each line gets automatically prefixed and indented
21according to user input.
22
23The prefix and the indentation are combined.  For each line of output
24going through this filter, the prefix is output first, then the amount
25of additional spaces indicated by the indentation, and then the line
26itself.
27
28By default, there is no prefix, and indentation is set to 0.
29
30BIO_set_prefix() sets the prefix to be used for future lines of
31text, using I<prefix>.  I<prefix> may be NULL, signifying that there
32should be no prefix.  If I<prefix> isn't NULL, this function makes a
33copy of it.
34
35BIO_set_indent() sets the indentation to be used for future lines of
36text, using I<indent>.  Negative values are not allowed.
37
38BIO_get_indent() gets the current indentation.
39
40=head1 NOTES
41
42BIO_set_prefix(), BIO_set_indent() and BIO_get_indent() are
43implemented as macros.
44
45=head1 RETURN VALUES
46
47BIO_f_prefix() returns the prefix BIO method.
48
49BIO_set_prefix() returns 1 if the prefix was correctly set, or <=0 on
50failure.
51
52BIO_set_indent() returns 1 if the prefix was correctly set, or <=0 on
53failure.
54
55BIO_get_indent() returns the current indentation, or a negative value for failure.
56
57=head1 SEE ALSO
58
59L<bio(7)>
60
61=head1 COPYRIGHT
62
63Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
64
65Licensed under the Apache License 2.0 (the "License").  You may not use
66this file except in compliance with the License.  You can obtain a copy
67in the file LICENSE in the source distribution or at
68L<https://www.openssl.org/source/license.html>.
69
70=cut
71