summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_CIPHER_do_all.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/EVP_CIPHER_do_all.3')
-rw-r--r--src/lib/libcrypto/man/EVP_CIPHER_do_all.397
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
54typedef 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
54calls 76calls
@@ -117,18 +139,71 @@ in lexicographic order of their
117.Fa from 139.Fa from
118names as determined by 140names as determined by
119.Xr strcmp 3 . 141.Xr strcmp 3 .
142.Pp
143.Vt OBJ_NAME
144is an abstraction of the types underlying the lookup tables
145for ciphers and their aliases, and digests and their aliases, respectively.
146For a cipher,
147.Fa type
148is
149.Dv OBJ_NAME_TYPE_CIPHER_METH ,
150.Fa alias
151is 0,
152.Fa name
153is its lookup name and
154.Fa data
155is the
156.Vt EVP_CIPHER
157object it represents, cast to
158.Vt const char * .
159For a cipher alias,
160.Fa type
161is
162.Dv OBJ_NAME_TYPE_CIPHER_METH ,
163.Fa alias
164is
165.Dv OBJ_NAME_ALIAS ,
166.Fa name
167is its lookup name and
168.Fa data
169is the name it aliases.
170Digests representing an
171.Vt EVP_MD
172object 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
176calls
177.Fa fn
178on every
179.Fa obj_name
180in the table that has the given
181.Fa type
182(either
183.Dv OBJ_NAME_TYPE_CIPHER_METH
184or
185.Dv OBJ_NAME_TYPE_MD_METH ) ,
186also passing the
187.Fa arg
188pointer.
189.Fn OBJ_NAME_do_all_sorted
190is similar except that it processes the
191.Fa obj_name
192in 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
125These functions first appeared in OpenSSL 1.0.0 and have been available since 199These 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 ,
129and 204and
130.Fn EVP_MD_do_all_sorted 205.Fn OBJ_NAME_do_all_sorted
131are wrappers of 206cannot report errors.
132.Xr OBJ_NAME_do_all_sorted 3 . 207In some implementations they need to allocate internally and
133In particular, if memory allocation fails, they do nothing at all 208if memory allocation fails they do nothing at all,
134without telling the caller about the problem. 209without telling the caller about the problem.