diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_CIPHER_do_all.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_CIPHER_do_all.3 | 97 |
1 files changed, 86 insertions, 11 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. |