diff options
author | tb <> | 2024-03-05 17:21:40 +0000 |
---|---|---|
committer | tb <> | 2024-03-05 17:21:40 +0000 |
commit | 718acb4db9804b32fa5d19c4102807c831aca5c8 (patch) | |
tree | e3afe3aa803f84041abfe835286a54716146ec2a | |
parent | cada8c5968a603c0e64c494712146ac29def42fc (diff) | |
download | openbsd-718acb4db9804b32fa5d19c4102807c831aca5c8.tar.gz openbsd-718acb4db9804b32fa5d19c4102807c831aca5c8.tar.bz2 openbsd-718acb4db9804b32fa5d19c4102807c831aca5c8.zip |
Remove EVP_MD_meth* documentation
Move the description of the EVP_MD_FLAGs to EVP_MD_nid() and add a
reference to the CMS specification.
-rw-r--r-- | src/lib/libcrypto/man/EVP_DigestInit.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_MD_CTX_ctrl.3 | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_MD_meth_new.3 | 352 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_MD_nid.3 | 60 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_sha1.3 | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EVP_sha3_224.3 | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/man/evp.3 | 5 |
8 files changed, 70 insertions, 378 deletions
diff --git a/src/lib/libcrypto/man/EVP_DigestInit.3 b/src/lib/libcrypto/man/EVP_DigestInit.3 index a5ce6f84f4..a578d99e1a 100644 --- a/src/lib/libcrypto/man/EVP_DigestInit.3 +++ b/src/lib/libcrypto/man/EVP_DigestInit.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.31 2023/09/07 19:59:58 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.32 2024/03/05 17:21:40 tb Exp $ |
2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 | 2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 |
3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -70,7 +70,7 @@ | |||
70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
72 | .\" | 72 | .\" |
73 | .Dd $Mdocdate: September 7 2023 $ | 73 | .Dd $Mdocdate: March 5 2024 $ |
74 | .Dt EVP_DIGESTINIT 3 | 74 | .Dt EVP_DIGESTINIT 3 |
75 | .Os | 75 | .Os |
76 | .Sh NAME | 76 | .Sh NAME |
@@ -533,7 +533,6 @@ main(int argc, char *argv[]) | |||
533 | .Xr EVP_DigestSignInit 3 , | 533 | .Xr EVP_DigestSignInit 3 , |
534 | .Xr EVP_DigestVerifyInit 3 , | 534 | .Xr EVP_DigestVerifyInit 3 , |
535 | .Xr EVP_MD_CTX_ctrl 3 , | 535 | .Xr EVP_MD_CTX_ctrl 3 , |
536 | .Xr EVP_MD_meth_new 3 , | ||
537 | .Xr EVP_MD_nid 3 , | 536 | .Xr EVP_MD_nid 3 , |
538 | .Xr EVP_PKEY_CTX_set_signature_md 3 , | 537 | .Xr EVP_PKEY_CTX_set_signature_md 3 , |
539 | .Xr EVP_PKEY_meth_set_signctx 3 , | 538 | .Xr EVP_PKEY_meth_set_signctx 3 , |
diff --git a/src/lib/libcrypto/man/EVP_MD_CTX_ctrl.3 b/src/lib/libcrypto/man/EVP_MD_CTX_ctrl.3 index 0aaeddd6d0..c8c148faf0 100644 --- a/src/lib/libcrypto/man/EVP_MD_CTX_ctrl.3 +++ b/src/lib/libcrypto/man/EVP_MD_CTX_ctrl.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_MD_CTX_ctrl.3,v 1.2 2023/09/07 19:28:37 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_MD_CTX_ctrl.3,v 1.3 2024/03/05 17:21:40 tb Exp $ |
2 | .\" full merge up to: OpenSSL man3/EVP_DigestInit.pod | 2 | .\" full merge up to: OpenSSL man3/EVP_DigestInit.pod |
3 | .\" 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -69,7 +69,7 @@ | |||
69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
71 | .\" | 71 | .\" |
72 | .Dd $Mdocdate: September 7 2023 $ | 72 | .Dd $Mdocdate: March 5 2024 $ |
73 | .Dt EVP_MD_CTX_CTRL 3 | 73 | .Dt EVP_MD_CTX_CTRL 3 |
74 | .Os | 74 | .Os |
75 | .Sh NAME | 75 | .Sh NAME |
@@ -236,8 +236,8 @@ is assigned. | |||
236 | .Fn EVP_MD_CTX_md_data | 236 | .Fn EVP_MD_CTX_md_data |
237 | returns the digest method private data of | 237 | returns the digest method private data of |
238 | .Fa ctx . | 238 | .Fa ctx . |
239 | The space was allocated and its size set with | 239 | The space is allocated with a size determined at compile time. |
240 | .Xr EVP_MD_meth_set_app_datasize 3 . | 240 | The size is not exposed by an API. |
241 | .Sh RETURN VALUES | 241 | .Sh RETURN VALUES |
242 | .Fn EVP_MD_CTX_ctrl | 242 | .Fn EVP_MD_CTX_ctrl |
243 | returns 1 for success or 0 for failure. | 243 | returns 1 for success or 0 for failure. |
@@ -256,7 +256,6 @@ return pointers to storage owned by | |||
256 | .Sh SEE ALSO | 256 | .Sh SEE ALSO |
257 | .Xr evp 3 , | 257 | .Xr evp 3 , |
258 | .Xr EVP_DigestInit 3 , | 258 | .Xr EVP_DigestInit 3 , |
259 | .Xr EVP_MD_meth_new 3 , | ||
260 | .Xr EVP_MD_nid 3 | 259 | .Xr EVP_MD_nid 3 |
261 | .Sh HISTORY | 260 | .Sh HISTORY |
262 | .Fn EVP_MD_CTX_set_flags , | 261 | .Fn EVP_MD_CTX_set_flags , |
diff --git a/src/lib/libcrypto/man/EVP_MD_meth_new.3 b/src/lib/libcrypto/man/EVP_MD_meth_new.3 deleted file mode 100644 index 8a80cca06e..0000000000 --- a/src/lib/libcrypto/man/EVP_MD_meth_new.3 +++ /dev/null | |||
@@ -1,352 +0,0 @@ | |||
1 | .\" $OpenBSD: EVP_MD_meth_new.3,v 1.5 2023/09/12 16:26:30 schwarze Exp $ | ||
2 | .\" selective merge up to: | ||
3 | .\" OpenSSL man3/EVP_MD_meth_new 0388d212 Dec 14 12:47:07 2018 -0800 | ||
4 | .\" | ||
5 | .\" This file is a derived work. | ||
6 | .\" The changes are covered by the following Copyright and license: | ||
7 | .\" | ||
8 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Richard Levitte <levitte@openssl.org> | ||
23 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
24 | .\" | ||
25 | .\" Redistribution and use in source and binary forms, with or without | ||
26 | .\" modification, are permitted provided that the following conditions | ||
27 | .\" are met: | ||
28 | .\" | ||
29 | .\" 1. Redistributions of source code must retain the above copyright | ||
30 | .\" notice, this list of conditions and the following disclaimer. | ||
31 | .\" | ||
32 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
33 | .\" notice, this list of conditions and the following disclaimer in | ||
34 | .\" the documentation and/or other materials provided with the | ||
35 | .\" distribution. | ||
36 | .\" | ||
37 | .\" 3. All advertising materials mentioning features or use of this | ||
38 | .\" software must display the following acknowledgment: | ||
39 | .\" "This product includes software developed by the OpenSSL Project | ||
40 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
41 | .\" | ||
42 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
43 | .\" endorse or promote products derived from this software without | ||
44 | .\" prior written permission. For written permission, please contact | ||
45 | .\" openssl-core@openssl.org. | ||
46 | .\" | ||
47 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
48 | .\" nor may "OpenSSL" appear in their names without prior written | ||
49 | .\" permission of the OpenSSL Project. | ||
50 | .\" | ||
51 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
52 | .\" acknowledgment: | ||
53 | .\" "This product includes software developed by the OpenSSL Project | ||
54 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
55 | .\" | ||
56 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
57 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
58 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
59 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
60 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
61 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
62 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
63 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
64 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
65 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
68 | .\" | ||
69 | .Dd $Mdocdate: September 12 2023 $ | ||
70 | .Dt EVP_MD_METH_NEW 3 | ||
71 | .Os | ||
72 | .Sh NAME | ||
73 | .Nm EVP_MD_meth_dup , | ||
74 | .Nm EVP_MD_meth_new , | ||
75 | .Nm EVP_MD_meth_free , | ||
76 | .Nm EVP_MD_meth_set_input_blocksize , | ||
77 | .Nm EVP_MD_meth_set_result_size , | ||
78 | .Nm EVP_MD_meth_set_app_datasize , | ||
79 | .Nm EVP_MD_meth_set_flags , | ||
80 | .Nm EVP_MD_meth_set_init , | ||
81 | .Nm EVP_MD_meth_set_update , | ||
82 | .Nm EVP_MD_meth_set_final , | ||
83 | .Nm EVP_MD_meth_set_copy , | ||
84 | .Nm EVP_MD_meth_set_cleanup , | ||
85 | .Nm EVP_MD_meth_set_ctrl | ||
86 | .Nd Routines to build up EVP_MD methods | ||
87 | .Sh SYNOPSIS | ||
88 | .In openssl/evp.h | ||
89 | .Ft EVP_MD * | ||
90 | .Fo EVP_MD_meth_new | ||
91 | .Fa "int md_type" | ||
92 | .Fa "int pkey_type" | ||
93 | .Fc | ||
94 | .Ft void | ||
95 | .Fo EVP_MD_meth_free | ||
96 | .Fa "EVP_MD *md" | ||
97 | .Fc | ||
98 | .Ft EVP_MD * | ||
99 | .Fo EVP_MD_meth_dup | ||
100 | .Fa "const EVP_MD *md" | ||
101 | .Fc | ||
102 | .Ft int | ||
103 | .Fo EVP_MD_meth_set_input_blocksize | ||
104 | .Fa "EVP_MD *md" | ||
105 | .Fa "int blocksize" | ||
106 | .Fc | ||
107 | .Ft int | ||
108 | .Fo EVP_MD_meth_set_result_size | ||
109 | .Fa "EVP_MD *md" | ||
110 | .Fa "int resultsize" | ||
111 | .Fc | ||
112 | .Ft int | ||
113 | .Fo EVP_MD_meth_set_app_datasize | ||
114 | .Fa "EVP_MD *md" | ||
115 | .Fa "int datasize" | ||
116 | .Fc | ||
117 | .Ft int | ||
118 | .Fo EVP_MD_meth_set_flags | ||
119 | .Fa "EVP_MD *md" | ||
120 | .Fa "unsigned long flags" | ||
121 | .Fc | ||
122 | .Ft int | ||
123 | .Fo EVP_MD_meth_set_init | ||
124 | .Fa "EVP_MD *md" | ||
125 | .Fa "int (*init)(EVP_MD_CTX *ctx)" | ||
126 | .Fc | ||
127 | .Ft int | ||
128 | .Fo EVP_MD_meth_set_update | ||
129 | .Fa "EVP_MD *md" | ||
130 | .Fa "int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count)" | ||
131 | .Fc | ||
132 | .Ft int | ||
133 | .Fo EVP_MD_meth_set_final | ||
134 | .Fa "EVP_MD *md" | ||
135 | .Fa "int (*final)(EVP_MD_CTX *ctx, unsigned char *md)" | ||
136 | .Fc | ||
137 | .Ft int | ||
138 | .Fo EVP_MD_meth_set_copy | ||
139 | .Fa "EVP_MD *md" | ||
140 | .Fa "int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from)" | ||
141 | .Fc | ||
142 | .Ft int | ||
143 | .Fo EVP_MD_meth_set_cleanup | ||
144 | .Fa "EVP_MD *md" | ||
145 | .Fa "int (*cleanup)(EVP_MD_CTX *ctx)" | ||
146 | .Fc | ||
147 | .Ft int | ||
148 | .Fo EVP_MD_meth_set_ctrl | ||
149 | .Fa "EVP_MD *md" | ||
150 | .Fa "int (*control)(EVP_MD_CTX *ctx, int command, int p1, void *p2)" | ||
151 | .Fc | ||
152 | .Sh DESCRIPTION | ||
153 | The | ||
154 | .Vt EVP_MD | ||
155 | type is a structure for digest method implementation. | ||
156 | It can also have associated public/private key signing and verifying | ||
157 | routines. | ||
158 | .Pp | ||
159 | .Fn EVP_MD_meth_new | ||
160 | creates a new | ||
161 | .Vt EVP_MD | ||
162 | structure. | ||
163 | .Pp | ||
164 | .Fn EVP_MD_meth_dup | ||
165 | creates a copy of | ||
166 | .Fa md . | ||
167 | .Pp | ||
168 | .Fn EVP_MD_meth_free | ||
169 | destroys a | ||
170 | .Vt EVP_MD | ||
171 | structure. | ||
172 | .Pp | ||
173 | .Fn EVP_MD_meth_set_input_blocksize | ||
174 | sets the internal input block size for the method | ||
175 | .Fa md | ||
176 | to | ||
177 | .Fa blocksize | ||
178 | bytes. | ||
179 | .Pp | ||
180 | .Fn EVP_MD_meth_set_result_size | ||
181 | sets the size of the result that the digest method in | ||
182 | .Fa md | ||
183 | is expected to produce to | ||
184 | .Fa resultsize | ||
185 | bytes. | ||
186 | .Pp | ||
187 | The digest method may have its own private data, which OpenSSL will | ||
188 | allocate for it. | ||
189 | .Fn EVP_MD_meth_set_app_datasize | ||
190 | should be used to set the size for it to | ||
191 | .Fa datasize . | ||
192 | .Pp | ||
193 | .Fn EVP_MD_meth_set_flags | ||
194 | sets the flags to describe optional behaviours in the particular | ||
195 | .Fa md . | ||
196 | Several flags can be or'd together. | ||
197 | The available flags are: | ||
198 | .Bl -tag -width Ds | ||
199 | .It Dv EVP_MD_FLAG_DIGALGID_NULL | ||
200 | When setting up a | ||
201 | .Vt DigestAlgorithmIdentifier | ||
202 | with | ||
203 | .Xr X509_ALGOR_set_md 3 , | ||
204 | set the parameter type to | ||
205 | .Dv V_ASN1_NULL | ||
206 | and the parameter value to | ||
207 | .Dv NULL . | ||
208 | This is the default, which means that it takes effect for | ||
209 | .Vt EVP_MD | ||
210 | objects that do not have | ||
211 | .Dv EVP_MD_FLAG_DIGALGID_ABSENT | ||
212 | set. | ||
213 | Use this for PKCS#1. | ||
214 | .It Dv EVP_MD_FLAG_DIGALGID_ABSENT | ||
215 | When setting up a | ||
216 | .Vt DigestAlgorithmIdentifier | ||
217 | with | ||
218 | .Xr X509_ALGOR_set_md 3 , | ||
219 | set the parameter type to | ||
220 | .Dv V_ASN1_UNDEF | ||
221 | and the parameter value to | ||
222 | .Dv NULL . | ||
223 | This is used by the | ||
224 | .Vt EVP_MD | ||
225 | objects documented in the manual page | ||
226 | .Xr EVP_sha3_224 3 | ||
227 | and by the objects returned from | ||
228 | .Xr EVP_sha512 3 , | ||
229 | .Xr EVP_sha512_256 3 , | ||
230 | .Xr EVP_sha512_224 3 , | ||
231 | .Xr EVP_sha384 3 , | ||
232 | .Xr EVP_sha256 3 , | ||
233 | .Xr EVP_sha224 3 , | ||
234 | .Xr EVP_sha1 3 , | ||
235 | and | ||
236 | .Xr EVP_sm3 3 . | ||
237 | .It Dv EVP_MD_FLAG_DIGALGID_CUSTOM | ||
238 | This flag is reserved for user-defined | ||
239 | .Vt EVP_MD | ||
240 | objects supporting custom | ||
241 | .Vt DigestAlgorithmIdentifier | ||
242 | handling via | ||
243 | .Xr EVP_MD_CTX_ctrl 3 , | ||
244 | but actually, it is ignored by both LibreSSL and OpenSSL | ||
245 | and such user-defined behaviour is not supported by the libraries. | ||
246 | .It Dv EVP_MD_FLAG_FIPS | ||
247 | Mark the digest method as suitable for FIPS mode. | ||
248 | This flag is ignored by both LibreSSL and OpenSSL. | ||
249 | .It Dv EVP_MD_FLAG_ONESHOT | ||
250 | Intended to indicate that the digest method can only handle one block | ||
251 | of input, but actually, this flag is ignored by both LibreSSL and OpenSSL. | ||
252 | .El | ||
253 | .Pp | ||
254 | .Fn EVP_MD_meth_set_init | ||
255 | sets the digest init function for | ||
256 | .Fa md . | ||
257 | The digest init function is called by | ||
258 | .Xr EVP_Digest 3 , | ||
259 | .Xr EVP_DigestInit 3 , | ||
260 | .Xr EVP_DigestInit_ex 3 , | ||
261 | EVP_SignInit, | ||
262 | .Xr EVP_SignInit_ex 3 , | ||
263 | .Xr EVP_VerifyInit 3 | ||
264 | and | ||
265 | .Xr EVP_VerifyInit_ex 3 . | ||
266 | .Pp | ||
267 | .Fn EVP_MD_meth_set_update | ||
268 | sets the digest update function for | ||
269 | .Fa md . | ||
270 | The digest update function is called by | ||
271 | .Xr EVP_Digest 3 , | ||
272 | .Xr EVP_DigestUpdate 3 | ||
273 | and | ||
274 | .Xr EVP_SignUpdate 3 . | ||
275 | .Pp | ||
276 | .Fn EVP_MD_meth_set_final | ||
277 | sets the digest final function for | ||
278 | .Fa md . | ||
279 | The digest final function is called by | ||
280 | .Xr EVP_Digest 3 , | ||
281 | .Xr EVP_DigestFinal 3 , | ||
282 | .Xr EVP_DigestFinal_ex 3 , | ||
283 | .Xr EVP_SignFinal 3 | ||
284 | and | ||
285 | .Xr EVP_VerifyFinal 3 . | ||
286 | .Pp | ||
287 | .Fn EVP_MD_meth_set_copy | ||
288 | sets the function for | ||
289 | .Fa md | ||
290 | to do extra computations after the method's private data structure has | ||
291 | been copied from one | ||
292 | .Vt EVP_MD_CTX | ||
293 | object to another. | ||
294 | If all that's needed is to copy the data, there is no need for this copy | ||
295 | function. | ||
296 | The copy function is passed two | ||
297 | .Vt EVP_MD_CTX | ||
298 | objects, the private data structure is then available with | ||
299 | .Xr EVP_MD_CTX_md_data 3 . | ||
300 | This copy function is called by | ||
301 | .Xr EVP_MD_CTX_copy 3 | ||
302 | and | ||
303 | .Xr EVP_MD_CTX_copy_ex 3 . | ||
304 | .Pp | ||
305 | .Fn EVP_MD_meth_set_cleanup | ||
306 | sets the function for | ||
307 | .Fa md | ||
308 | to do extra cleanup before the method's private data structure is | ||
309 | cleaned out and freed. | ||
310 | The cleanup function is passed an | ||
311 | .Vt EVP_MD_CTX | ||
312 | object, the private data structure is then available with | ||
313 | .Xr EVP_MD_CTX_md_data 3 . | ||
314 | This cleanup function is called by | ||
315 | .Xr EVP_MD_CTX_reset 3 | ||
316 | and | ||
317 | .Xr EVP_MD_CTX_free 3 . | ||
318 | .Pp | ||
319 | .Fn EVP_MD_meth_set_ctrl | ||
320 | sets the | ||
321 | .Fa control | ||
322 | function for | ||
323 | .Fa md . | ||
324 | The | ||
325 | .Fa control | ||
326 | function supplied by the application program has to return 1 to indicate | ||
327 | success, 0 to indicate failure, or \-1 if the | ||
328 | .Fa command | ||
329 | is not supported for this digest method. | ||
330 | See | ||
331 | .Xr EVP_MD_CTX_ctrl 3 | ||
332 | for the available | ||
333 | .Fa command | ||
334 | arguments. | ||
335 | .Sh RETURN VALUES | ||
336 | .Fn EVP_MD_meth_new | ||
337 | and | ||
338 | .Fn EVP_MD_meth_dup | ||
339 | return a pointer to a newly created | ||
340 | .Vt EVP_MD , | ||
341 | or NULL on failure. | ||
342 | All | ||
343 | .Fn EVP_MD_meth_set_* | ||
344 | functions return 1. | ||
345 | .Sh SEE ALSO | ||
346 | .Xr EVP_DigestInit 3 , | ||
347 | .Xr EVP_SignInit 3 , | ||
348 | .Xr EVP_VerifyInit 3 | ||
349 | .Sh HISTORY | ||
350 | All these functions | ||
351 | first appeared in OpenSSL 1.1.0 and have been available since | ||
352 | .Ox 7.1 . | ||
diff --git a/src/lib/libcrypto/man/EVP_MD_nid.3 b/src/lib/libcrypto/man/EVP_MD_nid.3 index acc0c704f4..15806091de 100644 --- a/src/lib/libcrypto/man/EVP_MD_nid.3 +++ b/src/lib/libcrypto/man/EVP_MD_nid.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_MD_nid.3,v 1.3 2023/09/07 16:32:41 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_MD_nid.3,v 1.4 2024/03/05 17:21:40 tb Exp $ |
2 | .\" full merge up to: OpenSSL man3/EVP_DigestInit.pod | 2 | .\" full merge up to: OpenSSL man3/EVP_DigestInit.pod |
3 | .\" 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -68,7 +68,7 @@ | |||
68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
70 | .\" | 70 | .\" |
71 | .Dd $Mdocdate: September 7 2023 $ | 71 | .Dd $Mdocdate: March 5 2024 $ |
72 | .Dt EVP_MD_NID 3 | 72 | .Dt EVP_MD_NID 3 |
73 | .Os | 73 | .Os |
74 | .Sh NAME | 74 | .Sh NAME |
@@ -170,12 +170,56 @@ is configured to use. | |||
170 | .Fn EVP_MD_flags | 170 | .Fn EVP_MD_flags |
171 | returns the message digest flags used by | 171 | returns the message digest flags used by |
172 | .Fa md . | 172 | .Fa md . |
173 | The meaning of the flags is described in the | ||
174 | .Xr EVP_MD_meth_set_flags 3 | ||
175 | manual page. | ||
176 | Be careful to not confuse these flags with the unrelated | 173 | Be careful to not confuse these flags with the unrelated |
177 | message digest context flags that can be inspected with | 174 | message digest context flags that can be inspected with |
178 | .Xr EVP_MD_CTX_test_flags 3 . | 175 | .Xr EVP_MD_CTX_test_flags 3 . |
176 | The available flags are: | ||
177 | .Bl -tag -width Ds | ||
178 | .It Dv EVP_MD_FLAG_DIGALGID_NULL | ||
179 | The parameters in a | ||
180 | .Vt DigestAlgorithmIdentifier | ||
181 | are encoded using an explicit ASN.1 | ||
182 | .Dv NULL | ||
183 | rather than omitting them. | ||
184 | This is the default, which means that it takes effect for | ||
185 | .Vt EVP_MD | ||
186 | objects that do not have | ||
187 | .Dv EVP_MD_FLAG_DIGALGID_ABSENT | ||
188 | set. | ||
189 | .It Dv EVP_MD_FLAG_DIGALGID_ABSENT | ||
190 | The parameters in a | ||
191 | .Vt DigestAlgorithmIdentifier | ||
192 | are omitted from the ASN.1 encoding. | ||
193 | This is used by the | ||
194 | .Vt EVP_MD | ||
195 | objects documented in the manual page | ||
196 | .Xr EVP_sha3_224 3 | ||
197 | and by the objects returned from | ||
198 | .Xr EVP_sha512 3 , | ||
199 | .Xr EVP_sha512_256 3 , | ||
200 | .Xr EVP_sha512_224 3 , | ||
201 | .Xr EVP_sha384 3 , | ||
202 | .Xr EVP_sha256 3 , | ||
203 | .Xr EVP_sha224 3 , | ||
204 | .Xr EVP_sha1 3 , | ||
205 | and | ||
206 | .Xr EVP_sm3 3 . | ||
207 | .It Dv EVP_MD_FLAG_DIGALGID_CUSTOM | ||
208 | This flag is reserved for user-defined | ||
209 | .Vt EVP_MD | ||
210 | objects supporting custom | ||
211 | .Vt DigestAlgorithmIdentifier | ||
212 | handling via | ||
213 | .Xr EVP_MD_CTX_ctrl 3 , | ||
214 | but actually, it is ignored by both LibreSSL and OpenSSL | ||
215 | and such user-defined behaviour is not supported by the libraries. | ||
216 | .It Dv EVP_MD_FLAG_FIPS | ||
217 | Mark the digest method as suitable for FIPS mode. | ||
218 | This flag is ignored by both LibreSSL and OpenSSL. | ||
219 | .It Dv EVP_MD_FLAG_ONESHOT | ||
220 | Intended to indicate that the digest method can only handle one block | ||
221 | of input, but actually, this flag is ignored by both LibreSSL and OpenSSL. | ||
222 | .El | ||
179 | .Pp | 223 | .Pp |
180 | .Fn EVP_MD_pkey_type | 224 | .Fn EVP_MD_pkey_type |
181 | returns the NID of the public key signing algorithm associated with this | 225 | returns the NID of the public key signing algorithm associated with this |
@@ -224,6 +268,12 @@ return the digest or block size in bytes. | |||
224 | .Xr EVP_DigestInit 3 , | 268 | .Xr EVP_DigestInit 3 , |
225 | .Xr EVP_MD_CTX_ctrl 3 , | 269 | .Xr EVP_MD_CTX_ctrl 3 , |
226 | .Xr OBJ_nid2obj 3 | 270 | .Xr OBJ_nid2obj 3 |
271 | .Sh STANDARDS | ||
272 | RFC 5754: Using SHA2 Algorithms with Cryptographic Message Syntax | ||
273 | .Bl -dash -compact -offset indent | ||
274 | .It | ||
275 | section 2: Message Digest Algorithms | ||
276 | .El | ||
227 | .Sh HISTORY | 277 | .Sh HISTORY |
228 | .Fn EVP_MD_size | 278 | .Fn EVP_MD_size |
229 | first appeared in SSLeay 0.6.6, | 279 | first appeared in SSLeay 0.6.6, |
diff --git a/src/lib/libcrypto/man/EVP_sha1.3 b/src/lib/libcrypto/man/EVP_sha1.3 index 43898a5f6a..b28c9f54c3 100644 --- a/src/lib/libcrypto/man/EVP_sha1.3 +++ b/src/lib/libcrypto/man/EVP_sha1.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_sha1.3,v 1.1 2023/08/27 15:33:08 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_sha1.3,v 1.2 2024/03/05 17:21:40 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> |
4 | .\" | 4 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: August 27 2023 $ | 17 | .Dd $Mdocdate: March 5 2024 $ |
18 | .Dt EVP_SHA1 3 | 18 | .Dt EVP_SHA1 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -67,8 +67,7 @@ These functions return pointers to static | |||
67 | objects implementing the hash functions. | 67 | objects implementing the hash functions. |
68 | .Sh SEE ALSO | 68 | .Sh SEE ALSO |
69 | .Xr evp 3 , | 69 | .Xr evp 3 , |
70 | .Xr EVP_DigestInit 3 , | 70 | .Xr EVP_DigestInit 3 |
71 | .Xr EVP_MD_meth_new 3 | ||
72 | .Sh STANDARDS | 71 | .Sh STANDARDS |
73 | .Rs | 72 | .Rs |
74 | .%A T. Polk | 73 | .%A T. Polk |
diff --git a/src/lib/libcrypto/man/EVP_sha3_224.3 b/src/lib/libcrypto/man/EVP_sha3_224.3 index bd9138c3f2..3c21ae1a09 100644 --- a/src/lib/libcrypto/man/EVP_sha3_224.3 +++ b/src/lib/libcrypto/man/EVP_sha3_224.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_sha3_224.3,v 1.2 2023/08/15 11:54:38 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_sha3_224.3,v 1.3 2024/03/05 17:21:40 tb Exp $ |
2 | .\" selective merge up to: OpenSSL bbda8ce9 Oct 31 15:43:01 2017 +0800 | 2 | .\" selective merge up to: OpenSSL bbda8ce9 Oct 31 15:43:01 2017 +0800 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Ronald Tse <ronald.tse@ribose.com>. | 4 | .\" This file was written by Ronald Tse <ronald.tse@ribose.com>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: August 15 2023 $ | 51 | .Dd $Mdocdate: March 5 2024 $ |
52 | .Dt EVP_SHA3_224 3 | 52 | .Dt EVP_SHA3_224 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -86,7 +86,6 @@ These functions return pointers to static | |||
86 | objects implementing the hash functions. | 86 | objects implementing the hash functions. |
87 | .Sh SEE ALSO | 87 | .Sh SEE ALSO |
88 | .Xr evp 3 , | 88 | .Xr evp 3 , |
89 | .Xr EVP_DigestInit 3 , | 89 | .Xr EVP_DigestInit 3 |
90 | .Xr EVP_MD_meth_new 3 | ||
91 | .Sh STANDARDS | 90 | .Sh STANDARDS |
92 | NIST FIPS 202 | 91 | NIST FIPS 202 |
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 56dc62e819..565f583127 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.283 2024/03/04 19:04:47 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.284 2024/03/05 17:21:40 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -170,7 +170,6 @@ MAN= \ | |||
170 | EVP_EncodeInit.3 \ | 170 | EVP_EncodeInit.3 \ |
171 | EVP_EncryptInit.3 \ | 171 | EVP_EncryptInit.3 \ |
172 | EVP_MD_CTX_ctrl.3 \ | 172 | EVP_MD_CTX_ctrl.3 \ |
173 | EVP_MD_meth_new.3 \ | ||
174 | EVP_MD_nid.3 \ | 173 | EVP_MD_nid.3 \ |
175 | EVP_OpenInit.3 \ | 174 | EVP_OpenInit.3 \ |
176 | EVP_PKCS82PKEY.3 \ | 175 | EVP_PKCS82PKEY.3 \ |
diff --git a/src/lib/libcrypto/man/evp.3 b/src/lib/libcrypto/man/evp.3 index f8b621434a..ece3bfe7fc 100644 --- a/src/lib/libcrypto/man/evp.3 +++ b/src/lib/libcrypto/man/evp.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: evp.3,v 1.27 2024/03/04 19:04:47 tb Exp $ | 1 | .\" $OpenBSD: evp.3,v 1.28 2024/03/05 17:21:40 tb Exp $ |
2 | .\" full merge up to: OpenSSL man7/evp 24a535ea Sep 22 13:14:20 2020 +0100 | 2 | .\" full merge up to: OpenSSL man7/evp 24a535ea Sep 22 13:14:20 2020 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>, | 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>, |
@@ -51,7 +51,7 @@ | |||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
53 | .\" | 53 | .\" |
54 | .Dd $Mdocdate: March 4 2024 $ | 54 | .Dd $Mdocdate: March 5 2024 $ |
55 | .Dt EVP 3 | 55 | .Dt EVP 3 |
56 | .Os | 56 | .Os |
57 | .Sh NAME | 57 | .Sh NAME |
@@ -186,7 +186,6 @@ family of functions provides base64 encoding and decoding. | |||
186 | .Xr EVP_EncodeInit 3 , | 186 | .Xr EVP_EncodeInit 3 , |
187 | .Xr EVP_EncryptInit 3 , | 187 | .Xr EVP_EncryptInit 3 , |
188 | .Xr EVP_MD_CTX_ctrl 3 , | 188 | .Xr EVP_MD_CTX_ctrl 3 , |
189 | .Xr EVP_MD_meth_new 3 , | ||
190 | .Xr EVP_MD_nid 3 , | 189 | .Xr EVP_MD_nid 3 , |
191 | .Xr EVP_OpenInit 3 , | 190 | .Xr EVP_OpenInit 3 , |
192 | .Xr EVP_PKCS82PKEY 3 , | 191 | .Xr EVP_PKCS82PKEY 3 , |