diff options
author | schwarze <> | 2022-12-18 22:27:10 +0000 |
---|---|---|
committer | schwarze <> | 2022-12-18 22:27:10 +0000 |
commit | d3f5245d8ed558fa8a547c364ffb7d09b83d1a0a (patch) | |
tree | de91ba81b13127135954322dc5cc02c05c1c963e /src | |
parent | 387550158a2a9d2c853157c50d29e4d3965e19b8 (diff) | |
download | openbsd-d3f5245d8ed558fa8a547c364ffb7d09b83d1a0a.tar.gz openbsd-d3f5245d8ed558fa8a547c364ffb7d09b83d1a0a.tar.bz2 openbsd-d3f5245d8ed558fa8a547c364ffb7d09b83d1a0a.zip |
document BIO_FLAGS_MEM_RDONLY
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/BIO_s_mem.3 | 19 |
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. | |||
104 | Any data written to a memory BIO can be recalled by reading from it. | 104 | Any data written to a memory BIO can be recalled by reading from it. |
105 | Unless the memory BIO is read only, | 105 | Unless the memory BIO is read only, |
106 | any data read from it is deleted from the BIO. | 106 | any data read from it is deleted from the BIO. |
107 | To find out whether a memory BIO is read only, | ||
108 | .Xr BIO_test_flags 3 | ||
109 | can be called with an argument of | ||
110 | .Dv BIO_FLAGS_MEM_RDONLY . | ||
107 | .Pp | 111 | .Pp |
108 | Memory BIOs support | 112 | Memory 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 |
263 | first appeared in OpenSSL 0.9.5 and has been available since | 267 | first appeared in OpenSSL 0.9.5 and has been available since |
264 | .Ox 2.7 . | 268 | .Ox 2.7 . |
269 | .Sh CAVEATS | ||
270 | Do not manually switch a writable memory BIO to read-only mode: calling | ||
271 | .Xr BIO_set_flags 3 | ||
272 | with an argument of | ||
273 | .Dv BIO_FLAGS_MEM_RDONLY | ||
274 | will ultimately result in a memory leak when the BIO object is | ||
275 | finally handed to | ||
276 | .Xr BIO_free 3 . | ||
277 | It might also cause security issues because it prevents | ||
278 | .Xr BIO_reset 3 | ||
279 | from clearing the data. | ||
265 | .Sh BUGS | 280 | .Sh BUGS |
266 | There should be an option to set the maximum size of a memory BIO. | 281 | There should be an option to set the maximum size of a memory BIO. |
267 | .Pp | 282 | .Pp |