diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/EVP_CIPHER_do_all.3 | 97 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OBJ_NAME_add.3 | 45 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OBJ_create.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OBJ_find_sigid_algs.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OBJ_nid2obj.3 | 7 |
5 files changed, 96 insertions, 63 deletions
diff --git a/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 b/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 index 1d43d503de..9411a41f7d 100644 --- a/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 +++ b/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 | |||
@@ -1,6 +1,7 @@ | |||
1 | .\" $OpenBSD: EVP_CIPHER_do_all.3,v 1.1 2023/08/30 00:58:57 tb Exp $ | 1 | .\" $OpenBSD: EVP_CIPHER_do_all.3,v 1.2 2024/01/31 08:02:53 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 3 | .\" Copyright (c) 2023,2024 Theo Buehler <tb@openbsd.org> |
4 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | 5 | .\" |
5 | .\" Permission to use, copy, modify, and distribute this software for any | 6 | .\" 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 | .\" purpose with or without fee is hereby granted, provided that the above |
@@ -14,7 +15,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 17 | .\" |
17 | .Dd $Mdocdate: August 30 2023 $ | 18 | .Dd $Mdocdate: January 31 2024 $ |
18 | .Dt EVP_CIPHER_DO_ALL 3 | 19 | .Dt EVP_CIPHER_DO_ALL 3 |
19 | .Os | 20 | .Os |
20 | .Sh NAME | 21 | .Sh NAME |
@@ -49,6 +50,27 @@ | |||
49 | const char *to, void *arg)" | 50 | const char *to, void *arg)" |
50 | .Fa "void *arg" | 51 | .Fa "void *arg" |
51 | .Fc | 52 | .Fc |
53 | .Bd -literal | ||
54 | typedef struct { | ||
55 | int type; | ||
56 | int alias; | ||
57 | const char *name; | ||
58 | const char *data; | ||
59 | } OBJ_NAME; | ||
60 | .Ed | ||
61 | .Pp | ||
62 | .Ft void | ||
63 | .Fo OBJ_NAME_do_all | ||
64 | .Fa "int type" | ||
65 | .Fa "void (*fn)(const OBJ_NAME *obj_name, void *arg)" | ||
66 | .Fa "void *arg" | ||
67 | .Fc | ||
68 | .Ft void | ||
69 | .Fo OBJ_NAME_do_all_sorted | ||
70 | .Fa "int type" | ||
71 | .Fa "void (*fn)(const OBJ_NAME *obj_name, void *arg)" | ||
72 | .Fa "void *arg" | ||
73 | .Fc | ||
52 | .Sh DESCRIPTION | 74 | .Sh DESCRIPTION |
53 | .Fn EVP_CIPHER_do_all | 75 | .Fn EVP_CIPHER_do_all |
54 | calls | 76 | calls |
@@ -117,18 +139,71 @@ in lexicographic order of their | |||
117 | .Fa from | 139 | .Fa from |
118 | names as determined by | 140 | names as determined by |
119 | .Xr strcmp 3 . | 141 | .Xr strcmp 3 . |
142 | .Pp | ||
143 | .Vt OBJ_NAME | ||
144 | is an abstraction of the types underlying the lookup tables | ||
145 | for ciphers and their aliases, and digests and their aliases, respectively. | ||
146 | For a cipher, | ||
147 | .Fa type | ||
148 | is | ||
149 | .Dv OBJ_NAME_TYPE_CIPHER_METH , | ||
150 | .Fa alias | ||
151 | is 0, | ||
152 | .Fa name | ||
153 | is its lookup name and | ||
154 | .Fa data | ||
155 | is the | ||
156 | .Vt EVP_CIPHER | ||
157 | object it represents, cast to | ||
158 | .Vt const char * . | ||
159 | For a cipher alias, | ||
160 | .Fa type | ||
161 | is | ||
162 | .Dv OBJ_NAME_TYPE_CIPHER_METH , | ||
163 | .Fa alias | ||
164 | is | ||
165 | .Dv OBJ_NAME_ALIAS , | ||
166 | .Fa name | ||
167 | is its lookup name and | ||
168 | .Fa data | ||
169 | is the name it aliases. | ||
170 | Digests representing an | ||
171 | .Vt EVP_MD | ||
172 | object and their aliases are represented similarly, except that their type is | ||
173 | .Dv OBJ_NAME_TYPE_MD_METH . | ||
174 | .Pp | ||
175 | .Fn OBJ_NAME_do_all | ||
176 | calls | ||
177 | .Fa fn | ||
178 | on every | ||
179 | .Fa obj_name | ||
180 | in the table that has the given | ||
181 | .Fa type | ||
182 | (either | ||
183 | .Dv OBJ_NAME_TYPE_CIPHER_METH | ||
184 | or | ||
185 | .Dv OBJ_NAME_TYPE_MD_METH ) , | ||
186 | also passing the | ||
187 | .Fa arg | ||
188 | pointer. | ||
189 | .Fn OBJ_NAME_do_all_sorted | ||
190 | is similar except that it processes the | ||
191 | .Fa obj_name | ||
192 | in lexicographic order of their names as determined by | ||
193 | .Xr strcmp 3 . | ||
120 | .Sh SEE ALSO | 194 | .Sh SEE ALSO |
121 | .Xr evp 3 , | 195 | .Xr evp 3 , |
122 | .Xr EVP_add_cipher 3 , | 196 | .Xr EVP_get_cipherbyname 3 , |
123 | .Xr OBJ_NAME_do_all 3 | 197 | .Xr EVP_get_digestbyname 3 |
124 | .Sh HISTORY | 198 | .Sh HISTORY |
125 | These functions first appeared in OpenSSL 1.0.0 and have been available since | 199 | These functions first appeared in OpenSSL 1.0.0 and have been available since |
126 | .Ox 4.9 . | 200 | .Ox 4.9 . |
127 | .Sh BUGS | 201 | .Sh CAVEATS |
128 | .Fn EVP_CIPHER_do_all_sorted | 202 | .Fn EVP_CIPHER_do_all_sorted , |
203 | .Fn EVP_MD_do_all_sorted , | ||
129 | and | 204 | and |
130 | .Fn EVP_MD_do_all_sorted | 205 | .Fn OBJ_NAME_do_all_sorted |
131 | are wrappers of | 206 | cannot report errors. |
132 | .Xr OBJ_NAME_do_all_sorted 3 . | 207 | In some implementations they need to allocate internally and |
133 | In particular, if memory allocation fails, they do nothing at all | 208 | if memory allocation fails they do nothing at all, |
134 | without telling the caller about the problem. | 209 | without telling the caller about the problem. |
diff --git a/src/lib/libcrypto/man/OBJ_NAME_add.3 b/src/lib/libcrypto/man/OBJ_NAME_add.3 index ad2ba80893..0b46010c49 100644 --- a/src/lib/libcrypto/man/OBJ_NAME_add.3 +++ b/src/lib/libcrypto/man/OBJ_NAME_add.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OBJ_NAME_add.3,v 1.5 2023/09/01 12:13:13 schwarze Exp $ | 1 | .\" $OpenBSD: OBJ_NAME_add.3,v 1.6 2024/01/31 08:02:53 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 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: September 1 2023 $ | 17 | .Dd $Mdocdate: January 31 2024 $ |
18 | .Dt OBJ_NAME_ADD 3 | 18 | .Dt OBJ_NAME_ADD 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -23,9 +23,7 @@ | |||
23 | .Nm OBJ_NAME_get , | 23 | .Nm OBJ_NAME_get , |
24 | .Nm OBJ_NAME_new_index , | 24 | .Nm OBJ_NAME_new_index , |
25 | .Nm OBJ_NAME_init , | 25 | .Nm OBJ_NAME_init , |
26 | .Nm OBJ_NAME_cleanup , | 26 | .Nm OBJ_NAME_cleanup |
27 | .Nm OBJ_NAME_do_all , | ||
28 | .Nm OBJ_NAME_do_all_sorted | ||
29 | .Nd global associative array | 27 | .Nd global associative array |
30 | .Sh SYNOPSIS | 28 | .Sh SYNOPSIS |
31 | .In openssl/objects.h | 29 | .In openssl/objects.h |
@@ -63,19 +61,6 @@ typedef struct { | |||
63 | const char *data; | 61 | const char *data; |
64 | } OBJ_NAME; | 62 | } OBJ_NAME; |
65 | .Ed | 63 | .Ed |
66 | .Pp | ||
67 | .Ft void | ||
68 | .Fo OBJ_NAME_do_all | ||
69 | .Fa "int type" | ||
70 | .Fa "void (*fn)(const OBJ_NAME *pair, void *arg)" | ||
71 | .Fa "void *arg" | ||
72 | .Fc | ||
73 | .Ft void | ||
74 | .Fo OBJ_NAME_do_all_sorted | ||
75 | .Fa "int type" | ||
76 | .Fa "void (*fn)(const OBJ_NAME *pair, void *arg)" | ||
77 | .Fa "void *arg" | ||
78 | .Fc | ||
79 | .Sh DESCRIPTION | 64 | .Sh DESCRIPTION |
80 | These functions implement a single, static associative array | 65 | These functions implement a single, static associative array |
81 | with the following properties: | 66 | with the following properties: |
@@ -264,25 +249,6 @@ If the | |||
264 | field is 0, the | 249 | field is 0, the |
265 | .Fa data | 250 | .Fa data |
266 | field contains the value; otherwise, it contains the alias target name. | 251 | field contains the value; otherwise, it contains the alias target name. |
267 | .Pp | ||
268 | .Fn OBJ_NAME_do_all | ||
269 | calls | ||
270 | .Fa fn | ||
271 | on every | ||
272 | .Fa pair | ||
273 | and alias in the array that has the given | ||
274 | .Fa type , | ||
275 | also passing the | ||
276 | .Fa arg | ||
277 | pointer. | ||
278 | .Fn OBJ_NAME_do_all_sorted | ||
279 | is similar except that it processes the pairs and aliases | ||
280 | in lexicographic order of their names as determined by | ||
281 | .Xr strcmp 3 , | ||
282 | ignoring any | ||
283 | .Fa cmp_func | ||
284 | that may be defined for the | ||
285 | .Fa type . | ||
286 | .Sh RETURN VALUES | 252 | .Sh RETURN VALUES |
287 | .Fn OBJ_NAME_add | 253 | .Fn OBJ_NAME_add |
288 | and | 254 | and |
@@ -339,8 +305,3 @@ that requires more cleanup than merely calling | |||
339 | .Xr free 3 | 305 | .Xr free 3 |
340 | on it, instances of the type need to begin with a magic number or string | 306 | on it, instances of the type need to begin with a magic number or string |
341 | that cannot occur at the beginning of a name. | 307 | that cannot occur at the beginning of a name. |
342 | .Pp | ||
343 | .Fn OBJ_NAME_do_all_sorted | ||
344 | is unable to report errors. | ||
345 | If memory allocations fails, it does nothing at all | ||
346 | without telling the caller about the problem. | ||
diff --git a/src/lib/libcrypto/man/OBJ_create.3 b/src/lib/libcrypto/man/OBJ_create.3 index 6bc255e981..fa5bde3dd3 100644 --- a/src/lib/libcrypto/man/OBJ_create.3 +++ b/src/lib/libcrypto/man/OBJ_create.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OBJ_create.3,v 1.9 2024/01/13 19:06:20 tb Exp $ | 1 | .\" $OpenBSD: OBJ_create.3,v 1.10 2024/01/31 08:02:53 tb Exp $ |
2 | .\" full merge up to: | 2 | .\" full merge up to: |
3 | .\" OpenSSL OBJ_nid2obj.pod 9b86974e Aug 17 15:21:33 2015 -0400 | 3 | .\" OpenSSL OBJ_nid2obj.pod 9b86974e Aug 17 15:21:33 2015 -0400 |
4 | .\" selective merge up to: | 4 | .\" selective merge up to: |
@@ -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: January 13 2024 $ | 72 | .Dd $Mdocdate: January 31 2024 $ |
73 | .Dt OBJ_CREATE 3 | 73 | .Dt OBJ_CREATE 3 |
74 | .Os | 74 | .Os |
75 | .Sh NAME | 75 | .Sh NAME |
@@ -200,7 +200,6 @@ obj = OBJ_nid2obj(new_nid); | |||
200 | .Ed | 200 | .Ed |
201 | .Sh SEE ALSO | 201 | .Sh SEE ALSO |
202 | .Xr ASN1_OBJECT_new 3 , | 202 | .Xr ASN1_OBJECT_new 3 , |
203 | .Xr OBJ_NAME_add 3 , | ||
204 | .Xr OBJ_nid2obj 3 | 203 | .Xr OBJ_nid2obj 3 |
205 | .Sh HISTORY | 204 | .Sh HISTORY |
206 | .Fn OBJ_new_nid , | 205 | .Fn OBJ_new_nid , |
diff --git a/src/lib/libcrypto/man/OBJ_find_sigid_algs.3 b/src/lib/libcrypto/man/OBJ_find_sigid_algs.3 index 9aeb54c90b..1d7a2b649b 100644 --- a/src/lib/libcrypto/man/OBJ_find_sigid_algs.3 +++ b/src/lib/libcrypto/man/OBJ_find_sigid_algs.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OBJ_find_sigid_algs.3,v 1.1 2023/07/22 06:35:26 tb Exp $ | 1 | .\" $OpenBSD: OBJ_find_sigid_algs.3,v 1.2 2024/01/31 08:02:53 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 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: July 22 2023 $ | 17 | .Dd $Mdocdate: January 31 2024 $ |
18 | .Dt OBJ_FIND_SIGID_ALGS 3 | 18 | .Dt OBJ_FIND_SIGID_ALGS 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -82,7 +82,6 @@ is not built into the library. | |||
82 | .Sh SEE ALSO | 82 | .Sh SEE ALSO |
83 | .Xr EVP_cleanup 3 , | 83 | .Xr EVP_cleanup 3 , |
84 | .Xr OBJ_create 3 , | 84 | .Xr OBJ_create 3 , |
85 | .Xr OBJ_NAME_add 3 , | ||
86 | .Xr OBJ_nid2obj 3 | 85 | .Xr OBJ_nid2obj 3 |
87 | .Sh HISTORY | 86 | .Sh HISTORY |
88 | These functions first appeared in OpenSSL 1.0.0 | 87 | These functions first appeared in OpenSSL 1.0.0 |
diff --git a/src/lib/libcrypto/man/OBJ_nid2obj.3 b/src/lib/libcrypto/man/OBJ_nid2obj.3 index 4e420b8311..ccab1ed30c 100644 --- a/src/lib/libcrypto/man/OBJ_nid2obj.3 +++ b/src/lib/libcrypto/man/OBJ_nid2obj.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OBJ_nid2obj.3,v 1.21 2023/09/05 13:50:22 schwarze Exp $ | 1 | .\" $OpenBSD: OBJ_nid2obj.3,v 1.22 2024/01/31 08:02:53 tb Exp $ |
2 | .\" full merge up to: OpenSSL c264592d May 14 11:28:00 2006 +0000 | 2 | .\" full merge up to: OpenSSL c264592d May 14 11:28:00 2006 +0000 |
3 | .\" selective merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200 | 3 | .\" selective merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200 |
4 | .\" | 4 | .\" |
@@ -67,7 +67,7 @@ | |||
67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
69 | .\" | 69 | .\" |
70 | .Dd $Mdocdate: September 5 2023 $ | 70 | .Dd $Mdocdate: January 31 2024 $ |
71 | .Dt OBJ_NID2OBJ 3 | 71 | .Dt OBJ_NID2OBJ 3 |
72 | .Os | 72 | .Os |
73 | .Sh NAME | 73 | .Sh NAME |
@@ -435,8 +435,7 @@ object = OBJ_txt2obj("1.2.3.4", 1); | |||
435 | .Xr ASN1_OBJECT_new 3 , | 435 | .Xr ASN1_OBJECT_new 3 , |
436 | .Xr BIO_new 3 , | 436 | .Xr BIO_new 3 , |
437 | .Xr d2i_ASN1_OBJECT 3 , | 437 | .Xr d2i_ASN1_OBJECT 3 , |
438 | .Xr OBJ_create 3 , | 438 | .Xr OBJ_create 3 |
439 | .Xr OBJ_NAME_add 3 | ||
440 | .Sh HISTORY | 439 | .Sh HISTORY |
441 | .Fn OBJ_nid2obj , | 440 | .Fn OBJ_nid2obj , |
442 | .Fn OBJ_nid2ln , | 441 | .Fn OBJ_nid2ln , |