diff options
author | tb <> | 2023-07-26 20:01:04 +0000 |
---|---|---|
committer | tb <> | 2023-07-26 20:01:04 +0000 |
commit | 02dcf97fe6b4150f3dd4ce85e13a39cf5184890a (patch) | |
tree | 94358780ae8935597ed619e9c71bccae32f482e9 | |
parent | ff7ed2e302f257f714c9a35abc90862a1662746c (diff) | |
download | openbsd-02dcf97fe6b4150f3dd4ce85e13a39cf5184890a.tar.gz openbsd-02dcf97fe6b4150f3dd4ce85e13a39cf5184890a.tar.bz2 openbsd-02dcf97fe6b4150f3dd4ce85e13a39cf5184890a.zip |
BIO_f_asn1 and the prefix/suffix API will be removed
Remove their documentation and mark some associated constants as
intentionally undocumented until they will be removed from public
headers.
-rw-r--r-- | src/lib/libcrypto/man/BIO_ctrl.3 | 14 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_f_asn1.3 | 228 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_find_type.3 | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/man/BIO_new.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 |
5 files changed, 14 insertions, 244 deletions
diff --git a/src/lib/libcrypto/man/BIO_ctrl.3 b/src/lib/libcrypto/man/BIO_ctrl.3 index b77c69b5bd..d4515ea9ad 100644 --- a/src/lib/libcrypto/man/BIO_ctrl.3 +++ b/src/lib/libcrypto/man/BIO_ctrl.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_ctrl.3,v 1.23 2023/05/01 07:28:11 tb Exp $ | 1 | .\" $OpenBSD: BIO_ctrl.3,v 1.24 2023/07/26 20:01:04 tb Exp $ |
2 | .\" full merge up to: OpenSSL 24a535eaf Tue Sep 22 13:14:20 2020 +0100 | 2 | .\" full merge up to: OpenSSL 24a535eaf Tue Sep 22 13:14:20 2020 +0100 |
3 | .\" selective merge up to: OpenSSL 0c5bc96f Tue Mar 15 13:57:22 2022 +0000 | 3 | .\" selective merge up to: OpenSSL 0c5bc96f Tue Mar 15 13:57:22 2022 +0000 |
4 | .\" | 4 | .\" |
@@ -66,7 +66,7 @@ | |||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
68 | .\" | 68 | .\" |
69 | .Dd $Mdocdate: May 1 2023 $ | 69 | .Dd $Mdocdate: July 26 2023 $ |
70 | .Dt BIO_CTRL 3 | 70 | .Dt BIO_CTRL 3 |
71 | .Os | 71 | .Os |
72 | .Sh NAME | 72 | .Sh NAME |
@@ -430,12 +430,10 @@ They are documented in the following manual pages: | |||
430 | .Bl -column BIO_CTRL_DGRAM_SET_RECV_TIMEOUT BIO_dgram_recv_timedout(3)\ | 430 | .Bl -column BIO_CTRL_DGRAM_SET_RECV_TIMEOUT BIO_dgram_recv_timedout(3)\ |
431 | -offset 3n | 431 | -offset 3n |
432 | .It Fa cmd No constant Ta manual page | 432 | .It Fa cmd No constant Ta manual page |
433 | .It Dv BIO_C_GET_EX_ARG Ta Xr BIO_f_asn1 3 | 433 | .\" The following constants are intentionally undocumented because |
434 | .It Dv BIO_C_GET_PREFIX Ta Xr BIO_asn1_get_prefix 3 | 434 | .\" BIO_f_asn1 has been removed from the public API. |
435 | .It Dv BIO_C_GET_SUFFIX Ta Xr BIO_asn1_get_suffix 3 | 435 | .\" .It Dv BIO_C_GET_EX_ARG Ta Xr BIO_f_asn1 3 |
436 | .It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3 | 436 | .\" .It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3 |
437 | .It Dv BIO_C_SET_PREFIX Ta Xr BIO_asn1_set_prefix 3 | ||
438 | .It Dv BIO_C_SET_SUFFIX Ta Xr BIO_asn1_set_suffix 3 | ||
439 | .It Dv BIO_CTRL_DGRAM_GET_FALLBACK_MTU Ta Xr BIO_dgram_set_peer 3 | 437 | .It Dv BIO_CTRL_DGRAM_GET_FALLBACK_MTU Ta Xr BIO_dgram_set_peer 3 |
440 | .It Dv BIO_CTRL_DGRAM_GET_MTU Ta Xr BIO_dgram_set_peer 3 | 438 | .It Dv BIO_CTRL_DGRAM_GET_MTU Ta Xr BIO_dgram_set_peer 3 |
441 | .It Dv BIO_CTRL_DGRAM_GET_RECV_TIMEOUT Ta Xr BIO_dgram_recv_timedout 3 | 439 | .It Dv BIO_CTRL_DGRAM_GET_RECV_TIMEOUT Ta Xr BIO_dgram_recv_timedout 3 |
diff --git a/src/lib/libcrypto/man/BIO_f_asn1.3 b/src/lib/libcrypto/man/BIO_f_asn1.3 deleted file mode 100644 index 19aa1f1ba7..0000000000 --- a/src/lib/libcrypto/man/BIO_f_asn1.3 +++ /dev/null | |||
@@ -1,228 +0,0 @@ | |||
1 | .\" $OpenBSD: BIO_f_asn1.3,v 1.3 2023/05/01 07:28:11 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: May 1 2023 $ | ||
18 | .Dt BIO_F_ASN1 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm BIO_f_asn1 , | ||
22 | .Nm asn1_ps_func , | ||
23 | .Nm BIO_asn1_set_prefix , | ||
24 | .Nm BIO_asn1_get_prefix , | ||
25 | .Nm BIO_asn1_set_suffix , | ||
26 | .Nm BIO_asn1_get_suffix | ||
27 | .Nd BER-encoding filter BIO | ||
28 | .Sh SYNOPSIS | ||
29 | .In openssl/asn1.h | ||
30 | .Ft const BIO_METHOD * | ||
31 | .Fn BIO_f_asn1 void | ||
32 | .In openssl/bio.h | ||
33 | .Ft typedef int | ||
34 | .Fo asn1_ps_func | ||
35 | .Fa "BIO *bio" | ||
36 | .Fa "unsigned char **pbuf" | ||
37 | .Fa "int *plen" | ||
38 | .Fa "void *parg" | ||
39 | .Fc | ||
40 | .Ft int | ||
41 | .Fo BIO_asn1_set_prefix | ||
42 | .Fa "BIO *chain" | ||
43 | .Fa "asn1_ps_func *prefix" | ||
44 | .Fa "asn1_ps_func *prefix_free" | ||
45 | .Fc | ||
46 | .Ft int | ||
47 | .Fo BIO_asn1_get_prefix | ||
48 | .Fa "BIO *chain" | ||
49 | .Fa "asn1_ps_func **pprefix" | ||
50 | .Fa "asn1_ps_func **pprefix_free" | ||
51 | .Fc | ||
52 | .Ft int | ||
53 | .Fo BIO_asn1_set_suffix | ||
54 | .Fa "BIO *chain" | ||
55 | .Fa "asn1_ps_func *suffix" | ||
56 | .Fa "asn1_ps_func *suffix_free" | ||
57 | .Fc | ||
58 | .Ft int | ||
59 | .Fo BIO_asn1_get_suffix | ||
60 | .Fa "BIO *chain" | ||
61 | .Fa "asn1_ps_func **psuffix" | ||
62 | .Fa "asn1_ps_func **psuffix_free" | ||
63 | .Fc | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn BIO_f_asn1 | ||
66 | returns the | ||
67 | .Qq asn1 | ||
68 | BIO method. | ||
69 | BIOs created from it with | ||
70 | .Xr BIO_new 3 | ||
71 | are filter BIOs intended to BER-encode data written to them | ||
72 | and pass the encoded data on to the next BIO in the chain. | ||
73 | Such BIOs operate as follows: | ||
74 | .Bl -hang -width 1n | ||
75 | .It Xr BIO_method_type 3 | ||
76 | returns | ||
77 | .Dv BIO_TYPE_ASN1 . | ||
78 | .It Xr BIO_method_name 3 | ||
79 | returns a pointer to the static string | ||
80 | .Qq asn1 . | ||
81 | .It Xr BIO_write 3 | ||
82 | writes the DER encoding of an ASN.1 OCTET STRING with the | ||
83 | .Fa len | ||
84 | content octets in | ||
85 | .Fa buf | ||
86 | to the next BIO in the chain. | ||
87 | .Pp | ||
88 | If a | ||
89 | .Fa prefix | ||
90 | function was installed with | ||
91 | .Fn BIO_asn1_set_prefix , | ||
92 | that function is called before writing the object. | ||
93 | It may for example produce additional output. | ||
94 | If it fails, writing fails. | ||
95 | .Pp | ||
96 | If a | ||
97 | .Fa prefix_free | ||
98 | function was installed as well, that function is called | ||
99 | after writing any output produced by | ||
100 | .Fa prefix | ||
101 | but before writing the object. | ||
102 | Failure of | ||
103 | .Fa prefix_free | ||
104 | is silently ignored. | ||
105 | .It Xr BIO_puts 3 | ||
106 | operates like | ||
107 | .Xr BIO_write 3 | ||
108 | but uses the | ||
109 | .Xr strlen 3 | ||
110 | of | ||
111 | .Fa buf | ||
112 | instead of a | ||
113 | .Fa len | ||
114 | argument. | ||
115 | .It Xr BIO_flush 3 | ||
116 | calls the | ||
117 | .Fa suffix | ||
118 | callback function, if any. | ||
119 | If that produces any output, it calls the | ||
120 | .Fa suffix_free | ||
121 | callback function, if any, silently ignoring failure. | ||
122 | Finally, it calls | ||
123 | .Xr BIO_flush 3 | ||
124 | on the next BIO in the chain. | ||
125 | It fails if no data was previously written or if the | ||
126 | .Fa suffix | ||
127 | callback, writing, or | ||
128 | .Xr BIO_flush 3 | ||
129 | on the next BIO fail. | ||
130 | .It Xr BIO_ctrl 3 | ||
131 | with a | ||
132 | .Fa cmd | ||
133 | of | ||
134 | .Dv BIO_C_SET_EX_ARG | ||
135 | stores the pointer | ||
136 | .Fa parg | ||
137 | internally such that it will be passed to the | ||
138 | .Fn asn1_ps_func | ||
139 | callback functions. | ||
140 | With a | ||
141 | .Fa cmd | ||
142 | of | ||
143 | .Dv BIO_C_GET_EX_ARG , | ||
144 | it retrieves that pointer, storing it in | ||
145 | .Pf * Fa parg . | ||
146 | The commands | ||
147 | .Dv BIO_C_SET_PREFIX , | ||
148 | .Dv BIO_C_GET_PREFIX , | ||
149 | .Dv BIO_C_SET_SUFFIX , | ||
150 | .Dv BIO_C_GET_SUFFIX , | ||
151 | and | ||
152 | .Dv BIO_CTRL_FLUSH | ||
153 | are used internally to implement | ||
154 | .Fn BIO_asn1_set_prefix , | ||
155 | .Fn BIO_asn1_get_prefix , | ||
156 | .Fn BIO_asn1_set_suffix , | ||
157 | .Fn BIO_asn1_get_suffix | ||
158 | and | ||
159 | .Xr BIO_flush 3 | ||
160 | and are not intended for use by application programs. | ||
161 | Other commands are merely forwarded to the next BIO in the chain. | ||
162 | .It Xo | ||
163 | .Xr BIO_read 3 , | ||
164 | .Xr BIO_gets 3 , | ||
165 | and | ||
166 | .Xr BIO_callback_ctrl 3 | ||
167 | .Xc | ||
168 | merely call the same function on the next BIO in the chain. | ||
169 | .El | ||
170 | .Pp | ||
171 | If the above description of a function mentions the next BIO in the | ||
172 | chain, that function fails if the asn1 BIO is the last BIO in the chain. | ||
173 | .Pp | ||
174 | .Fn BIO_asn1_set_prefix | ||
175 | and | ||
176 | .Fn BIO_asn1_get_prefix | ||
177 | install and retrieve the | ||
178 | .Fa prefix | ||
179 | and | ||
180 | .Fa prefix_free | ||
181 | callback functions in and from the first asn1 BIO in the given | ||
182 | .Fa chain . | ||
183 | Similarly, | ||
184 | .Fn BIO_asn1_set_suffix | ||
185 | and | ||
186 | .Fn BIO_asn1_get_suffix | ||
187 | install and retrieve the | ||
188 | .Fa suffix | ||
189 | and | ||
190 | .Fa suffix_free | ||
191 | callback functions. | ||
192 | Passing a | ||
193 | .Dv NULL | ||
194 | pointer for any of the | ||
195 | .Fn asn1_ps_func | ||
196 | arguments disables that particular callback. | ||
197 | .Sh RETURN VALUES | ||
198 | .Fn BIO_f_asn1 | ||
199 | always returns a pointer to a static built-in object. | ||
200 | .Pp | ||
201 | Functions of the type | ||
202 | .Fn asn1_ps_func | ||
203 | are supposed to return 1 on success or 0 on failure. | ||
204 | .Pp | ||
205 | .Fn BIO_asn1_set_prefix , | ||
206 | .Fn BIO_asn1_get_prefix , | ||
207 | .Fn BIO_asn1_set_suffix , | ||
208 | and | ||
209 | .Fn BIO_asn1_get_suffix | ||
210 | return 1 on success or 0 if | ||
211 | .Fa chain | ||
212 | is a | ||
213 | .Dv NULL | ||
214 | pointer or does not contain any asn1 BIO. | ||
215 | They may return \-2 if a BIO is encountered in the | ||
216 | .Fa chain | ||
217 | that is not properly initialized. | ||
218 | .Sh SEE ALSO | ||
219 | .Xr ASN1_put_object 3 , | ||
220 | .Xr BIO_ctrl 3 , | ||
221 | .Xr BIO_new 3 , | ||
222 | .Xr BIO_next 3 , | ||
223 | .Xr BIO_write 3 , | ||
224 | .Xr i2d_ASN1_OCTET_STRING 3 | ||
225 | .Sh HISTORY | ||
226 | These functions first appeared in OpenSSL 1.0.0 | ||
227 | and have been available since | ||
228 | .Ox 4.9 . | ||
diff --git a/src/lib/libcrypto/man/BIO_find_type.3 b/src/lib/libcrypto/man/BIO_find_type.3 index 8169ad10fc..4a9eee7832 100644 --- a/src/lib/libcrypto/man/BIO_find_type.3 +++ b/src/lib/libcrypto/man/BIO_find_type.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_find_type.3,v 1.11 2023/04/11 15:35:31 schwarze Exp $ | 1 | .\" $OpenBSD: BIO_find_type.3,v 1.12 2023/07/26 20:01:04 tb 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. |
@@ -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: April 11 2023 $ | 68 | .Dd $Mdocdate: July 26 2023 $ |
69 | .Dt BIO_FIND_TYPE 3 | 69 | .Dt BIO_FIND_TYPE 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -180,7 +180,9 @@ and | |||
180 | set in their type constant. | 180 | set in their type constant. |
181 | .Bl -column BIO_TYPE_NULL_FILTER "datagram socket" BIO_s_datagram(3) | 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 | 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 | 183 | .\" BIO_TYPE_ASN1 is intentionally undocumented because BIO_f_asn1 was |
184 | .\" removed from the public API. | ||
185 | .\" .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 | 186 | .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 | 187 | .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 | 188 | .It Dv BIO_TYPE_CIPHER Ta cipher Ta Xr BIO_f_cipher 3 |
diff --git a/src/lib/libcrypto/man/BIO_new.3 b/src/lib/libcrypto/man/BIO_new.3 index bce804131e..f97a314826 100644 --- a/src/lib/libcrypto/man/BIO_new.3 +++ b/src/lib/libcrypto/man/BIO_new.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: BIO_new.3,v 1.27 2023/07/21 04:50:47 tb Exp $ | 1 | .\" $OpenBSD: BIO_new.3,v 1.28 2023/07/26 20:01:04 tb Exp $ |
2 | .\" full merge up to: | 2 | .\" full merge up to: |
3 | .\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000 | 3 | .\" OpenSSL man3/BIO_new.pod fb46be03 Feb 26 11:51:31 2016 +0000 |
4 | .\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100 | 4 | .\" OpenSSL man7/bio.pod 631c37be Dec 12 16:56:50 2017 +0100 |
@@ -52,7 +52,7 @@ | |||
52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
54 | .\" | 54 | .\" |
55 | .Dd $Mdocdate: July 21 2023 $ | 55 | .Dd $Mdocdate: July 26 2023 $ |
56 | .Dt BIO_NEW 3 | 56 | .Dt BIO_NEW 3 |
57 | .Os | 57 | .Os |
58 | .Sh NAME | 58 | .Sh NAME |
@@ -232,7 +232,6 @@ Create a memory BIO: | |||
232 | .Xr BIO_ctrl 3 , | 232 | .Xr BIO_ctrl 3 , |
233 | .Xr BIO_dump 3 , | 233 | .Xr BIO_dump 3 , |
234 | .Xr BIO_dup_chain 3 , | 234 | .Xr BIO_dup_chain 3 , |
235 | .Xr BIO_f_asn1 3 , | ||
236 | .Xr BIO_f_base64 3 , | 235 | .Xr BIO_f_base64 3 , |
237 | .Xr BIO_f_buffer 3 , | 236 | .Xr BIO_f_buffer 3 , |
238 | .Xr BIO_f_cipher 3 , | 237 | .Xr BIO_f_cipher 3 , |
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 99e1af1698..669b0c1395 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.256 2023/07/22 06:34:59 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.257 2023/07/26 20:01:04 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -37,7 +37,6 @@ MAN= \ | |||
37 | BIO_ctrl.3 \ | 37 | BIO_ctrl.3 \ |
38 | BIO_dump.3 \ | 38 | BIO_dump.3 \ |
39 | BIO_dup_chain.3 \ | 39 | BIO_dup_chain.3 \ |
40 | BIO_f_asn1.3 \ | ||
41 | BIO_f_base64.3 \ | 40 | BIO_f_base64.3 \ |
42 | BIO_f_buffer.3 \ | 41 | BIO_f_buffer.3 \ |
43 | BIO_f_cipher.3 \ | 42 | BIO_f_cipher.3 \ |