From 22d8a87cee0b0c4979f8edba55b6bc01eec2a6af Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 29 Apr 2023 12:04:54 +0000 Subject: [PATCH] Mention the type-specific BIO_ctrl(3) command constants in the manual pages of the respective BIO types. --- lib/libcrypto/man/BIO_s_fd.3 | 21 +++++++++++++++------ lib/libcrypto/man/BIO_s_mem.3 | 21 +++++++++++++++++++-- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/lib/libcrypto/man/BIO_s_fd.3 b/lib/libcrypto/man/BIO_s_fd.3 index ee70c56a028..de5d5d70077 100644 --- a/lib/libcrypto/man/BIO_s_fd.3 +++ b/lib/libcrypto/man/BIO_s_fd.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: BIO_s_fd.3,v 1.11 2023/04/11 16:58:43 schwarze Exp $ +.\" $OpenBSD: BIO_s_fd.3,v 1.12 2023/04/29 12:04:54 schwarze Exp $ .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file is a derived work. @@ -65,7 +65,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 11 2023 $ +.Dd $Mdocdate: April 29 2023 $ .Dt BIO_S_FD 3 .Os .Sh NAME @@ -201,10 +201,19 @@ manual pages. File descriptor BIOs should not be used for socket I/O. Use socket BIOs instead. .Pp -.Fn BIO_set_fd -and -.Fn BIO_get_fd -are implemented as macros. +.Xr BIO_ctrl 3 +.Fa cmd +arguments correspond to macros as follows: +.Bl -column BIO_CTRL_GET_CLOSE BIO_get_close(3) -offset 3n +.It Fa cmd No constant Ta corresponding macro +.It Dv BIO_C_FILE_SEEK Ta Xr BIO_seek 3 +.It Dv BIO_C_FILE_TELL Ta Xr BIO_tell 3 +.It Dv BIO_C_GET_FD Ta Fn BIO_get_fd +.It Dv BIO_C_SET_FD Ta Fn BIO_set_fd +.It Dv BIO_CTRL_GET_CLOSE Ta Xr BIO_get_close 3 +.It Dv BIO_CTRL_RESET Ta Xr BIO_reset 3 +.It Dv BIO_CTRL_SET_CLOSE Ta Xr BIO_set_close 3 +.El .Sh RETURN VALUES .Fn BIO_s_fd returns the file descriptor BIO method. diff --git a/lib/libcrypto/man/BIO_s_mem.3 b/lib/libcrypto/man/BIO_s_mem.3 index 4592922444d..475cd8869f2 100644 --- a/lib/libcrypto/man/BIO_s_mem.3 +++ b/lib/libcrypto/man/BIO_s_mem.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: BIO_s_mem.3,v 1.17 2023/04/11 16:58:43 schwarze Exp $ +.\" $OpenBSD: BIO_s_mem.3,v 1.18 2023/04/29 12:04:54 schwarze Exp $ .\" full merge up to: OpenSSL 8711efb4 Mon Apr 20 11:33:12 2009 +0000 .\" selective merge up to: OpenSSL 36359cec Mar 7 14:37:23 2018 +0100 .\" @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 11 2023 $ +.Dd $Mdocdate: April 29 2023 $ .Dt BIO_S_MEM 3 .Os .Sh NAME @@ -203,6 +203,23 @@ until the BIO is freed. .Pp Writes to memory BIOs will always succeed if memory is available: their size can grow indefinitely. +.Pp +.Xr BIO_ctrl 3 +.Fa cmd +arguments correspond to macros as follows: +.Bl -column BIO_C_SET_BUF_MEM_EOF_RETURN BIO_set_mem_eof_return() -offset 3n +.It Fa cmd No constant Ta corresponding macro +.It Dv BIO_C_GET_BUF_MEM_PTR Ta Fn BIO_get_mem_ptr +.It Dv BIO_C_SET_BUF_MEM Ta Fn BIO_set_mem_buf +.It Dv BIO_C_SET_BUF_MEM_EOF_RETURN Ta Fn BIO_set_mem_eof_return +.It Dv BIO_CTRL_EOF Ta Xr BIO_eof 3 +.It Dv BIO_CTRL_GET_CLOSE Ta Xr BIO_get_close 3 +.It Dv BIO_CTRL_INFO Ta Fn BIO_get_mem_data +.It Dv BIO_CTRL_PENDING Ta Xr BIO_pending 3 +.It Dv BIO_CTRL_RESET Ta Xr BIO_reset 3 +.It Dv BIO_CTRL_SET_CLOSE Ta Xr BIO_set_close 3 +.It Dv BIO_CTRL_WPENDING Ta Xr BIO_wpending 3 +.El .Sh RETURN VALUES .Fn BIO_s_mem returns a pointer to a static object. -- 2.20.1