BIO_F_PREFIX(3ossl)
π
BIO_F_PREFIX β the prefix BIO filter (OpenSSL, man page 3ossl)
ok so bestie, welcome to the 3ossl girlies of the OpenSSL manual β this one is short, sweet, and lowkey iconic. buckle up π
β¨ NAME β¨
BIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent β it's giving prefix BIO filter, and yes that's the whole name section, she's concise π
πΈ SYNOPSIS πΈ
#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);
π¦ DESCRIPTION π¦
okay so BIO_f_prefix() returns the prefix BIO method. (yes, the page literally says BIO_f_cipher() right there in the description β not me, not my typo, I'm just the messenger π). Anyway β this is a filter for text output, where each line gets automatically prefixed and indented according to user input. main character filter behavior, honestly π
The prefix and the indentation get combined, bestie. For every single line of output going through this filter, it goes down like this:
- the prefix gets output first π
- then the amount of additional spaces indicated by the indentation
- then the line itself
By default there is no prefix, and indentation is set to 0. clean slate, no notes β¨
BIO_set_prefix()β sets the prefix to be used for future lines of text, using prefix. prefix may beNULL, signifying that there should be no prefix. And if prefix isn'tNULL, this function makes a copy of it (she's not borrowing your hoodie, she's buying her own π«Ά).BIO_set_indent()β sets the indentation to be used for future lines of text, using indent. Negative values are not allowed. no cap, just don't πBIO_get_indent()β gets the current indentation. that's it, that's the whole job π
β NOTES β
heads up, bestie: BIO_set_prefix(), BIO_set_indent() and BIO_get_indent() are implemented as macros. iykyk π§
π₯ RETURN VALUES π₯
BIO_f_prefix()returns the prefix BIO method. slay.BIO_set_prefix()returns1if the prefix was correctly set, or<=0on failure. πBIO_set_indent()returns1if the prefix was correctly set, or<=0on failure. (yes, still says "prefix" β copying the page faithfully, don't come for me π)BIO_get_indent()returns the current indentation, or a negative value for failure. π
fr fr check your return values, a <=0 is not the vibe and you will be debugging at 2am wondering why your output looks cursed π
π SEE ALSO π
bio(7)β go read her, she's the mother of all of this π
π COPYRIGHT π
Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
ok that's the whole page, you ate that π«Ά stay hydrated, read your man pages, and remember: prefix first, spaces second, line third, periodt π
version 3.5.6 β’ dated 2026-04-07 β’ BIO_F_PREFIX(3ossl) β’ mwah π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms