BIO_F_READBUFFER(3ossl)
π BIO_F_READBUFFER π
okay bestie, gather round β this is the BIO_F_READBUFFER page from the OpenSSL manuals, and it's giving "buffering but make it seekable". Let's get into it π¦
β¨ NAME β¨
BIO_f_readbuffer β a read only buffering BIO that supports BIO_tell() and BIO_seek() π
β¨ SYNOPSIS β¨
#include <openssl/bio.h>
const BIO_METHOD *BIO_f_readbuffer(void);
β¨ DESCRIPTION β¨
BIO_f_readbuffer() returns the read buffering BIO method. That's the whole vibe π
This BIO filter can be inserted on top of BIO's that do not support BIO_tell() or BIO_seek() β like, for example, a file BIO that uses stdin. iykyk π«Ά
Data read from a read buffering BIO comes from an internal buffer, and that buffer gets filled from the next BIO in the chain. Chain energy, literally β¨
BIO_gets() is supported for read buffering BIOs. Slay. But writing data to a read buffering BIO is not supported β it's read only, bestie, respect the boundary π
Also lowkey important: calling BIO_reset() on a read buffering BIO does not clear any buffered data. The buffer stays. It's committed π
β¨ NOTES β¨
Read buffering BIOs implement BIO_read_ex() by using BIO_read_ex() operations on the next BIO (e.g. a file BIO) in the chain, and storing the result in an internal buffer β from which bytes are given back to the caller as appropriate for the call. Efficient? Yes. Iconic? Also yes. π§
BIO_read_ex() is guaranteed to give the caller the number of bytes it asks for, unless there's an error or end of communication is reached in the next BIO. So basically: you get what you asked for, or something went sideways π
The internal buffer can grow to cache the entire contents of the next BIO in the chain. Main character buffer energy. π
BIO_seek() uses the internal buffer, so it can only seek into data that is already read. No time travel, no seeking into the future, periodt π
β¨ RETURN VALUES β¨
BIO_f_readbuffer() returns the read buffering BIO method. Same as above, fr fr πΈ
β¨ SEE ALSO β¨
β¨ COPYRIGHT β¨
Copyright 2021 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. π
Friendly reminder bestie: read the license, it's not a vibe-killer, it's just the rules π
And that's the whole page!! This was version 3.5.9, dated 2026-09-29, from the BIO_F_READBUFFER(3ossl) manual. Go forth and buffer, you absolute icon π¦β¨π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms