1BIO_F_READBUFFER(3ossl) OpenSSL BIO_F_READBUFFER(3ossl)
2
3
4
6 BIO_f_readbuffer - read only buffering BIO that supports BIO_tell() and
7 BIO_seek()
8
10 #include <openssl/bio.h>
11
12 const BIO_METHOD *BIO_f_readbuffer(void);
13
15 BIO_f_readbuffer() returns the read buffering BIO method.
16
17 This BIO filter can be inserted on top of BIO's that do not support
18 BIO_tell() or BIO_seek() (e.g. A file BIO that uses stdin).
19
20 Data read from a read buffering BIO comes from an internal buffer which
21 is filled from the next BIO in the chain.
22
23 BIO_gets() is supported for read buffering BIOs. Writing data to a
24 read buffering BIO is not supported.
25
26 Calling BIO_reset() on a read buffering BIO does not clear any buffered
27 data.
28
30 Read buffering BIOs implement BIO_read_ex() by using BIO_read_ex()
31 operations on the next BIO (e.g. a file BIO) in the chain and storing
32 the result in an internal buffer, from which bytes are given back to
33 the caller as appropriate for the call. BIO_read_ex() is guaranteed to
34 give the caller the number of bytes it asks for, unless there's an
35 error or end of communication is reached in the next BIO. The internal
36 buffer can grow to cache the entire contents of the next BIO in the
37 chain. BIO_seek() uses the internal buffer, so that it can only seek
38 into data that is already read.
39
41 BIO_f_readbuffer() returns the read buffering BIO method.
42
44 bio(7), BIO_read(3), BIO_gets(3), BIO_reset(3), BIO_ctrl(3).
45
47 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
48
49 Licensed under the Apache License 2.0 (the "License"). You may not use
50 this file except in compliance with the License. You can obtain a copy
51 in the file LICENSE in the source distribution or at
52 <https://www.openssl.org/source/license.html>.
53
54
55
563.0.9 2023-07-27 BIO_F_READBUFFER(3ossl)