diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/BIO_find_type.3 | 109 |
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 |
136 | argument is also set in the candidate BIO. | 111 | argument is also set in the candidate BIO. |
137 | .Pp | 112 | .Pp |
138 | Not all the | ||
139 | .Dv BIO_TYPE_* | ||
140 | types shown above have corresponding BIO implementations. | ||
141 | .Pp | ||
142 | Types with a least significant byte in the range from 0 to | 113 | Types with a least significant byte in the range from 0 to |
143 | .Dv BIO_TYPE_START , | 114 | .Dv BIO_TYPE_START , |
144 | inclusive, are reserved for BIO types built into the library. | 115 | inclusive, 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 |
164 | returns an ASCII string representing the type of the | 135 | returns an ASCII string representing the type of the |
165 | .Fa bio . | 136 | .Fa bio . |
137 | .Pp | ||
138 | The following are the built-in source/sink BIO types | ||
139 | that operate on file descriptors. | ||
140 | They all have both of the bits | ||
141 | .Dv BIO_TYPE_SOURCE_SINK | ||
142 | and | ||
143 | .Dv BIO_TYPE_DESCRIPTOR | ||
144 | but not the bit | ||
145 | .Dv BIO_TYPE_FILTER | ||
146 | set 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 | ||
156 | The following are the built-in source/sink BIO types | ||
157 | that do not directly operate on file descriptors. | ||
158 | They all have the bit | ||
159 | .Dv BIO_TYPE_SOURCE_SINK | ||
160 | but not the bits | ||
161 | .Dv BIO_TYPE_DESCRIPTOR | ||
162 | and | ||
163 | .Dv BIO_TYPE_FILTER | ||
164 | set 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 | ||
173 | The following are the built-in filter BIO types. | ||
174 | They all have the bit | ||
175 | .Dv BIO_TYPE_FILTER | ||
176 | but not the bits | ||
177 | .Dv BIO_TYPE_SOURCE_SINK | ||
178 | and | ||
179 | .Dv BIO_TYPE_DESCRIPTOR | ||
180 | set 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 | ||
192 | The constants | ||
193 | .Dv BIO_TYPE_BER , | ||
194 | .Dv BIO_TYPE_PROXY_CLIENT , | ||
195 | and | ||
196 | .Dv BIO_TYPE_PROXY_SERVER | ||
197 | do not correspond to any BIO types implemented by the library and are | ||
198 | not intended to be used for application-defined types, either. | ||
199 | The constants | ||
200 | .Dv BIO_TYPE_COMP , | ||
201 | .Dv BIO_TYPE_LINEBUFFER , | ||
202 | and | ||
203 | .Dv BIO_TYPE_NBIO_TEST | ||
204 | corresponds to a deprecated BIO types that are intentionally undocumented. | ||
205 | .Pp | ||
206 | If a variable in an application program is intended | ||
207 | to store a BIO type but temporarily does not refer to any BIO | ||
208 | or refers to a BIO of an unknown type, setting the variable to | ||
209 | .Dv BIO_TYPE_NONE | ||
210 | is recommended. | ||
166 | .Sh RETURN VALUES | 211 | .Sh RETURN VALUES |
167 | .Fn BIO_find_type | 212 | .Fn BIO_find_type |
168 | returns the next matching BIO or | 213 | returns the next matching BIO or |