summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2023-04-11 15:35:31 +0000
committerschwarze <>2023-04-11 15:35:31 +0000
commit6fbee68fe7bb75a1431ced24d6195ff7a2b30f88 (patch)
tree1c030622e5c89a5d8956fa431ec8a982c0cd3c14 /src
parent99254fb9052821c9c53dbba0bd6e94a6a3682ee4 (diff)
downloadopenbsd-6fbee68fe7bb75a1431ced24d6195ff7a2b30f88.tar.gz
openbsd-6fbee68fe7bb75a1431ced24d6195ff7a2b30f88.tar.bz2
openbsd-6fbee68fe7bb75a1431ced24d6195ff7a2b30f88.zip
While all the BIO_TYPE_* constants are part of the API, most of their
values are only part of the ABI and not of the API, so delete them from the SYNOPSIS: application programmers must not rely on the specific values. Instead of listing the specific values, properly describe the meaning of all these constants. However, the values of BIO_TYPE_NONE and BIO_TYPE_START are hard-coded into the API and application programmers need to be aware of their values, so those remain in the SYNOPSIS.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/BIO_find_type.3109
1 files changed, 77 insertions, 32 deletions
diff --git a/src/lib/libcrypto/man/BIO_find_type.3 b/src/lib/libcrypto/man/BIO_find_type.3
index 8882dbf404..8169ad10fc 100644
--- a/src/lib/libcrypto/man/BIO_find_type.3
+++ b/src/lib/libcrypto/man/BIO_find_type.3
@@ -1,10 +1,10 @@
1.\" $OpenBSD: BIO_find_type.3,v 1.10 2021/11/25 12:15:37 schwarze Exp $ 1.\" $OpenBSD: BIO_find_type.3,v 1.11 2023/04/11 15:35:31 schwarze Exp $
2.\" full merge up to: OpenSSL 1cb7eff4 Sep 10 13:56:40 2019 +0100 2.\" full merge up to: OpenSSL 1cb7eff4 Sep 10 13:56:40 2019 +0100
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license: 5.\" The changes are covered by the following Copyright and license:
6.\" 6.\"
7.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 7.\" Copyright (c) 2021, 2023 Ingo Schwarze <schwarze@openbsd.org>
8.\" 8.\"
9.\" Permission to use, copy, modify, and distribute this software for any 9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above 10.\" purpose with or without fee is hereby granted, provided that the above
@@ -65,7 +65,7 @@
65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66.\" OF THE POSSIBILITY OF SUCH DAMAGE. 66.\" OF THE POSSIBILITY OF SUCH DAMAGE.
67.\" 67.\"
68.Dd $Mdocdate: November 25 2021 $ 68.Dd $Mdocdate: April 11 2023 $
69.Dt BIO_FIND_TYPE 3 69.Dt BIO_FIND_TYPE 3
70.Os 70.Os
71.Sh NAME 71.Sh NAME
@@ -94,31 +94,6 @@
94.Fa "const BIO *bio" 94.Fa "const BIO *bio"
95.Fc 95.Fc
96.Fd #define BIO_TYPE_NONE 0 96.Fd #define BIO_TYPE_NONE 0
97.Fd #define BIO_TYPE_MEM (1|0x0400)
98.Fd #define BIO_TYPE_FILE (2|0x0400)
99.Fd #define BIO_TYPE_FD (4|0x0400|0x0100)
100.Fd #define BIO_TYPE_SOCKET (5|0x0400|0x0100)
101.Fd #define BIO_TYPE_NULL (6|0x0400)
102.Fd #define BIO_TYPE_SSL (7|0x0200)
103.Fd #define BIO_TYPE_MD (8|0x0200)
104.Fd #define BIO_TYPE_BUFFER (9|0x0200)
105.Fd #define BIO_TYPE_CIPHER (10|0x0200)
106.Fd #define BIO_TYPE_BASE64 (11|0x0200)
107.Fd #define BIO_TYPE_CONNECT (12|0x0400|0x0100)
108.Fd #define BIO_TYPE_ACCEPT (13|0x0400|0x0100)
109.Fd #define BIO_TYPE_PROXY_CLIENT (14|0x0200)
110.Fd #define BIO_TYPE_PROXY_SERVER (15|0x0200)
111.Fd #define BIO_TYPE_NBIO_TEST (16|0x0200)
112.Fd #define BIO_TYPE_NULL_FILTER (17|0x0200)
113.Fd #define BIO_TYPE_BER (18|0x0200)
114.Fd #define BIO_TYPE_BIO (19|0x0400)
115.Fd #define BIO_TYPE_LINEBUFFER (20|0x0200)
116.Fd #define BIO_TYPE_DGRAM (21|0x0400|0x0100)
117.Fd #define BIO_TYPE_ASN1 (22|0x0200)
118.Fd #define BIO_TYPE_COMP (23|0x0200)
119.Fd #define BIO_TYPE_DESCRIPTOR 0x0100
120.Fd #define BIO_TYPE_FILTER 0x0200
121.Fd #define BIO_TYPE_SOURCE_SINK 0x0400
122.Fd #define BIO_TYPE_START 128 97.Fd #define BIO_TYPE_START 128
123.Sh DESCRIPTION 98.Sh DESCRIPTION
124.Fn BIO_find_type 99.Fn BIO_find_type
@@ -135,10 +110,6 @@ Otherwise, a match only requires that any of the bits set in the
135.Fa type 110.Fa type
136argument is also set in the candidate BIO. 111argument is also set in the candidate BIO.
137.Pp 112.Pp
138Not all the
139.Dv BIO_TYPE_*
140types shown above have corresponding BIO implementations.
141.Pp
142Types with a least significant byte in the range from 0 to 113Types with a least significant byte in the range from 0 to
143.Dv BIO_TYPE_START , 114.Dv BIO_TYPE_START ,
144inclusive, are reserved for BIO types built into the library. 115inclusive, are reserved for BIO types built into the library.
@@ -163,6 +134,80 @@ returns the type of the given
163.Fn BIO_method_name 134.Fn BIO_method_name
164returns an ASCII string representing the type of the 135returns an ASCII string representing the type of the
165.Fa bio . 136.Fa bio .
137.Pp
138The following are the built-in source/sink BIO types
139that operate on file descriptors.
140They all have both of the bits
141.Dv BIO_TYPE_SOURCE_SINK
142and
143.Dv BIO_TYPE_DESCRIPTOR
144but not the bit
145.Dv BIO_TYPE_FILTER
146set in their type constant.
147.Bl -column BIO_TYPE_NULL_FILTER "datagram socket" BIO_s_datagram(3)
148.It Fa type No constant Ta Em name No string Ta Vt BIO_METHOD
149.It Dv BIO_TYPE_ACCEPT Ta socket accept Ta Xr BIO_s_accept 3
150.It Dv BIO_TYPE_CONNECT Ta socket connect Ta Xr BIO_s_connect 3
151.It Dv BIO_TYPE_DGRAM Ta datagram socket Ta Xr BIO_s_datagram 3
152.It Dv BIO_TYPE_FD Ta file descriptor Ta Xr BIO_s_fd 3
153.It Dv BIO_TYPE_SOCKET Ta socket Ta Xr BIO_s_socket 3
154.El
155.Pp
156The following are the built-in source/sink BIO types
157that do not directly operate on file descriptors.
158They all have the bit
159.Dv BIO_TYPE_SOURCE_SINK
160but not the bits
161.Dv BIO_TYPE_DESCRIPTOR
162and
163.Dv BIO_TYPE_FILTER
164set in their type constant.
165.Bl -column BIO_TYPE_NULL_FILTER "datagram socket" BIO_s_datagram(3)
166.It Fa type No constant Ta Em name No string Ta Vt BIO_METHOD
167.It Dv BIO_TYPE_BIO Ta BIO pair Ta Xr BIO_s_bio 3
168.It Dv BIO_TYPE_FILE Ta FILE pointer Ta Xr BIO_s_file 3
169.It Dv BIO_TYPE_MEM Ta memory buffer Ta Xr BIO_s_mem 3
170.It Dv BIO_TYPE_NULL Ta NULL Ta Xr BIO_s_null 3
171.El
172.Pp
173The following are the built-in filter BIO types.
174They all have the bit
175.Dv BIO_TYPE_FILTER
176but not the bits
177.Dv BIO_TYPE_SOURCE_SINK
178and
179.Dv BIO_TYPE_DESCRIPTOR
180set in their type constant.
181.Bl -column BIO_TYPE_NULL_FILTER "datagram socket" BIO_s_datagram(3)
182.It Fa type No constant Ta Em name No string Ta Vt BIO_METHOD
183.It Dv BIO_TYPE_ASN1 Ta asn1 Ta Xr BIO_f_asn1 3
184.It Dv BIO_TYPE_BASE64 Ta base64 encoding Ta Xr BIO_f_base64 3
185.It Dv BIO_TYPE_BUFFER Ta buffer Ta Xr BIO_f_buffer 3
186.It Dv BIO_TYPE_CIPHER Ta cipher Ta Xr BIO_f_cipher 3
187.It Dv BIO_TYPE_MD Ta message digest Ta Xr BIO_f_md 3
188.It Dv BIO_TYPE_NULL_FILTER Ta NULL filter Ta Xr BIO_f_null 3
189.It Dv BIO_TYPE_SSL Ta ssl Ta Xr BIO_f_ssl 3
190.El
191.Pp
192The constants
193.Dv BIO_TYPE_BER ,
194.Dv BIO_TYPE_PROXY_CLIENT ,
195and
196.Dv BIO_TYPE_PROXY_SERVER
197do not correspond to any BIO types implemented by the library and are
198not intended to be used for application-defined types, either.
199The constants
200.Dv BIO_TYPE_COMP ,
201.Dv BIO_TYPE_LINEBUFFER ,
202and
203.Dv BIO_TYPE_NBIO_TEST
204corresponds to a deprecated BIO types that are intentionally undocumented.
205.Pp
206If a variable in an application program is intended
207to store a BIO type but temporarily does not refer to any BIO
208or refers to a BIO of an unknown type, setting the variable to
209.Dv BIO_TYPE_NONE
210is recommended.
166.Sh RETURN VALUES 211.Sh RETURN VALUES
167.Fn BIO_find_type 212.Fn BIO_find_type
168returns the next matching BIO or 213returns the next matching BIO or