BIO_F_READBUFFER(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… BIO_f_readbuffer β€” OpenSSL 3ossl manual page, but make it make sense ✨

okay so bestie, welcome to the OpenSSL 3ossl manual page for BIO_f_readbuffer β€” the read only buffering BIO that supports BIO_tell() and BIO_seek(), and it's lowkey a whole vibe. πŸ¦‹

🌸 NAME 🌸

BIO_f_readbuffer β€” read only buffering BIO that supports BIO_tell() and BIO_seek(). No cap. πŸ’–

✨ 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 function tea. 🫢

This BIO filter can be inserted on top of BIOs that do not support BIO_tell() or BIO_seek() (e.g. a file BIO that uses stdin). Iconic workaround energy. πŸ’…

  • Data read from a read buffering BIO comes from an internal buffer which is filled from the next BIO in the chain.
  • BIO_gets() is supported for read buffering BIOs.
  • Writing data to a read buffering BIO is not supported.
  • Calling BIO_reset() on a read buffering BIO does not clear any buffered data.
writing to a read buffering BIO? nope, not supported, bestie. don't try it. 😭

πŸ”₯ 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. πŸ’«

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. That's the guarantee, periodt. πŸ‘‘

The internal buffer can grow to cache the entire contents of the next BIO in the chain. It's giving "I'll hold that for you" energy. πŸ“

BIO_seek() uses the internal buffer, so that it can only seek into data that is already read. no time travel, bestie β€” only already-read data. ⏳

🌈 RETURN VALUES 🌈

BIO_f_readbuffer() returns the read buffering BIO method. Same tea as above, but this is the official return-values section. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

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>.


okay that's the page, bestie! source/version: 3.5.6; date: 2026-04-07; footer tag: BIO_F_READBUFFER(3ossl). stay buffered πŸ’…βœ¨

πŸ“¦ where this page comes from