summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/man/BIO_s_mem.319
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_mem.3 b/src/lib/libcrypto/man/BIO_s_mem.3
index f2522a8065..437632134b 100644
--- a/src/lib/libcrypto/man/BIO_s_mem.3
+++ b/src/lib/libcrypto/man/BIO_s_mem.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_s_mem.3,v 1.15 2022/02/19 16:00:14 jsing Exp $ 1.\" $OpenBSD: BIO_s_mem.3,v 1.16 2022/12/18 22:27:10 schwarze Exp $
2.\" full merge up to: OpenSSL 8711efb4 Mon Apr 20 11:33:12 2009 +0000 2.\" full merge up to: OpenSSL 8711efb4 Mon Apr 20 11:33:12 2009 +0000
3.\" selective merge up to: OpenSSL 36359cec Mar 7 14:37:23 2018 +0100 3.\" selective merge up to: OpenSSL 36359cec Mar 7 14:37:23 2018 +0100
4.\" 4.\"
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: February 19 2022 $ 52.Dd $Mdocdate: December 18 2022 $
53.Dt BIO_S_MEM 3 53.Dt BIO_S_MEM 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -104,6 +104,10 @@ structure which is extended as appropriate to accommodate the stored data.
104Any data written to a memory BIO can be recalled by reading from it. 104Any data written to a memory BIO can be recalled by reading from it.
105Unless the memory BIO is read only, 105Unless the memory BIO is read only,
106any data read from it is deleted from the BIO. 106any data read from it is deleted from the BIO.
107To find out whether a memory BIO is read only,
108.Xr BIO_test_flags 3
109can be called with an argument of
110.Dv BIO_FLAGS_MEM_RDONLY .
107.Pp 111.Pp
108Memory BIOs support 112Memory BIOs support
109.Xr BIO_gets 3 113.Xr BIO_gets 3
@@ -262,6 +266,17 @@ first appeared in SSLeay 0.9.1 and have been available since
262.Fn BIO_new_mem_buf 266.Fn BIO_new_mem_buf
263first appeared in OpenSSL 0.9.5 and has been available since 267first appeared in OpenSSL 0.9.5 and has been available since
264.Ox 2.7 . 268.Ox 2.7 .
269.Sh CAVEATS
270Do not manually switch a writable memory BIO to read-only mode: calling
271.Xr BIO_set_flags 3
272with an argument of
273.Dv BIO_FLAGS_MEM_RDONLY
274will ultimately result in a memory leak when the BIO object is
275finally handed to
276.Xr BIO_free 3 .
277It might also cause security issues because it prevents
278.Xr BIO_reset 3
279from clearing the data.
265.Sh BUGS 280.Sh BUGS
266There should be an option to set the maximum size of a memory BIO. 281There should be an option to set the maximum size of a memory BIO.
267.Pp 282.Pp