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 | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 b/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 new file mode 100644 index 0000000000..1d43d503de --- /dev/null +++ b/src/lib/libcrypto/man/EVP_CIPHER_do_all.3 | |||
@@ -0,0 +1,134 @@ | |||
1 | .\" $OpenBSD: EVP_CIPHER_do_all.3,v 1.1 2023/08/30 00:58:57 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2023 Theo Buehler <tb@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: August 30 2023 $ | ||
18 | .Dt EVP_CIPHER_DO_ALL 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm EVP_CIPHER_do_all , | ||
22 | .Nm EVP_CIPHER_do_all_sorted , | ||
23 | .Nm EVP_MD_do_all , | ||
24 | .Nm EVP_MD_do_all_sorted | ||
25 | .Nd iterate over lookup tables for ciphers and digests | ||
26 | .Sh SYNOPSIS | ||
27 | .In openssl/evp.h | ||
28 | .Ft void | ||
29 | .Fo EVP_CIPHER_do_all | ||
30 | .Fa "void (*fn)(const EVP_CIPHER *cipher, const char *from,\ | ||
31 | const char *to, void *arg)" | ||
32 | .Fa "void *arg" | ||
33 | .Fc | ||
34 | .Ft void | ||
35 | .Fo EVP_CIPHER_do_all_sorted | ||
36 | .Fa "void (*fn)(const EVP_CIPHER *cipher, const char *from,\ | ||
37 | const char *to, void *arg)" | ||
38 | .Fa "void *arg" | ||
39 | .Fc | ||
40 | .Ft void | ||
41 | .Fo EVP_MD_do_all | ||
42 | .Fa "void (*fn)(const EVP_MD *md, const char *from,\ | ||
43 | const char *to, void *arg)" | ||
44 | .Fa "void *arg" | ||
45 | .Fc | ||
46 | .Ft void | ||
47 | .Fo EVP_MD_do_all_sorted | ||
48 | .Fa "void (*fn)(const EVP_MD *md, const char *from,\ | ||
49 | const char *to, void *arg)" | ||
50 | .Fa "void *arg" | ||
51 | .Fc | ||
52 | .Sh DESCRIPTION | ||
53 | .Fn EVP_CIPHER_do_all | ||
54 | calls | ||
55 | .Fa fn | ||
56 | on every entry of the global table of cipher names and aliases. | ||
57 | For a cipher name entry, | ||
58 | .Fa fn | ||
59 | is called with a non-NULL | ||
60 | .Fa cipher , | ||
61 | its non-NULL cipher name | ||
62 | .Fa from , | ||
63 | a NULL | ||
64 | .Fa to , | ||
65 | and the | ||
66 | .Fa arg | ||
67 | pointer. | ||
68 | For an alias entry, | ||
69 | .Fa fn | ||
70 | is called with a NULL | ||
71 | .Fa cipher , | ||
72 | its alias | ||
73 | .Fa from , | ||
74 | the cipher name that alias points | ||
75 | .Fa to , | ||
76 | and the | ||
77 | .Fa arg | ||
78 | pointer. | ||
79 | .Pp | ||
80 | .Fn EVP_CIPHER_do_all_sorted | ||
81 | is similar, except that it processes the cipher names and aliases | ||
82 | in lexicographic order of their | ||
83 | .Fa from | ||
84 | names as determined by | ||
85 | .Xr strcmp 3 . | ||
86 | .Pp | ||
87 | .Fn EVP_MD_do_all | ||
88 | calls | ||
89 | .Fa fn | ||
90 | on every entry of the global table of digest names and aliases. | ||
91 | For a digest name entry, | ||
92 | .Fa fn | ||
93 | is called with a non-NULL | ||
94 | .Fa md , | ||
95 | its non-NULL digest name | ||
96 | .Fa from , | ||
97 | a NULL | ||
98 | .Fa to , | ||
99 | and the | ||
100 | .Fa arg | ||
101 | pointer. | ||
102 | For an alias entry, | ||
103 | .Fa fn | ||
104 | is called with a NULL | ||
105 | .Fa md , | ||
106 | its alias | ||
107 | .Fa from , | ||
108 | the digest name that alias points | ||
109 | .Fa to , | ||
110 | and the | ||
111 | .Fa arg | ||
112 | pointer. | ||
113 | .Pp | ||
114 | .Fn EVP_MD_do_all_sorted | ||
115 | is similar, except that it processes the digest names and aliases | ||
116 | in lexicographic order of their | ||
117 | .Fa from | ||
118 | names as determined by | ||
119 | .Xr strcmp 3 . | ||
120 | .Sh SEE ALSO | ||
121 | .Xr evp 3 , | ||
122 | .Xr EVP_add_cipher 3 , | ||
123 | .Xr OBJ_NAME_do_all 3 | ||
124 | .Sh HISTORY | ||
125 | These functions first appeared in OpenSSL 1.0.0 and have been available since | ||
126 | .Ox 4.9 . | ||
127 | .Sh BUGS | ||
128 | .Fn EVP_CIPHER_do_all_sorted | ||
129 | and | ||
130 | .Fn EVP_MD_do_all_sorted | ||
131 | are wrappers of | ||
132 | .Xr OBJ_NAME_do_all_sorted 3 . | ||
133 | In particular, if memory allocation fails, they do nothing at all | ||
134 | without telling the caller about the problem. | ||