diff options
author | schwarze <> | 2025-06-09 12:43:53 +0000 |
---|---|---|
committer | schwarze <> | 2025-06-09 12:43:53 +0000 |
commit | 32b60effa89c7fa97c04b7e9e8e6b1304d3a4ad3 (patch) | |
tree | 9fc9332adb5e1c9914a47453e24d14e40e5cd765 /src/lib/libcrypto | |
parent | 0f2ff66f233cd2c66afdc89bc6e649d3333a8ccd (diff) | |
download | openbsd-32b60effa89c7fa97c04b7e9e8e6b1304d3a4ad3.tar.gz openbsd-32b60effa89c7fa97c04b7e9e8e6b1304d3a4ad3.tar.bz2 openbsd-32b60effa89c7fa97c04b7e9e8e6b1304d3a4ad3.zip |
Retire the manual pages OPENSSL_load_builtin_modules(3) and OBJ_NAME_add(3)
because these functions no longer exist.
OK tb@
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/man/CONF_modules_load_file.3 | 14 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OBJ_NAME_add.3 | 307 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OPENSSL_config.3 | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OPENSSL_init_crypto.3 | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 | 101 | ||||
-rw-r--r-- | src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 | 34 |
7 files changed, 25 insertions, 456 deletions
diff --git a/src/lib/libcrypto/man/CONF_modules_load_file.3 b/src/lib/libcrypto/man/CONF_modules_load_file.3 index 50fa6a9801..78cfc32f0d 100644 --- a/src/lib/libcrypto/man/CONF_modules_load_file.3 +++ b/src/lib/libcrypto/man/CONF_modules_load_file.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: CONF_modules_load_file.3,v 1.15 2025/06/08 22:40:29 schwarze Exp $ | 1 | .\" $OpenBSD: CONF_modules_load_file.3,v 1.16 2025/06/09 12:43:53 schwarze Exp $ |
2 | .\" full merge up to: e9b77246 Jan 20 19:58:49 2017 +0100 | 2 | .\" full merge up to: e9b77246 Jan 20 19:58:49 2017 +0100 |
3 | .\" selective merge up to: d090fc00 Feb 26 13:11:10 2019 +0800 | 3 | .\" selective merge up to: d090fc00 Feb 26 13:11:10 2019 +0800 |
4 | .\" | 4 | .\" |
@@ -66,7 +66,7 @@ | |||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
68 | .\" | 68 | .\" |
69 | .Dd $Mdocdate: June 8 2025 $ | 69 | .Dd $Mdocdate: June 9 2025 $ |
70 | .Dt CONF_MODULES_LOAD_FILE 3 | 70 | .Dt CONF_MODULES_LOAD_FILE 3 |
71 | .Os | 71 | .Os |
72 | .Sh NAME | 72 | .Sh NAME |
@@ -223,7 +223,6 @@ Load custom configuration file and section instead of the standard one, | |||
223 | only print warnings on error, missing configuration file ignored: | 223 | only print warnings on error, missing configuration file ignored: |
224 | .Bd -literal | 224 | .Bd -literal |
225 | OPENSSL_no_config(); | 225 | OPENSSL_no_config(); |
226 | OPENSSL_load_builtin_modules(); | ||
227 | if (CONF_modules_load_file("/something/app.cnf", "myapp", | 226 | if (CONF_modules_load_file("/something/app.cnf", "myapp", |
228 | CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) { | 227 | CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) { |
229 | fprintf(stderr, "WARNING: error loading configuration file\en"); | 228 | fprintf(stderr, "WARNING: error loading configuration file\en"); |
@@ -234,11 +233,7 @@ if (CONF_modules_load_file("/something/app.cnf", "myapp", | |||
234 | In the previous example, the call to | 233 | In the previous example, the call to |
235 | .Xr OPENSSL_no_config 3 | 234 | .Xr OPENSSL_no_config 3 |
236 | is required first to suppress automatic loading | 235 | is required first to suppress automatic loading |
237 | of the standard configuration file, and the call to | 236 | of the standard configuration file. |
238 | .Xr OPENSSL_load_builtin_modules 3 | ||
239 | is needed so that the configuration of builtin modules | ||
240 | is loaded in addition to the configuration of | ||
241 | .Qq myapp . | ||
242 | .Pp | 237 | .Pp |
243 | Load and parse configuration file manually, custom error handling: | 238 | Load and parse configuration file manually, custom error handling: |
244 | .Bd -literal | 239 | .Bd -literal |
@@ -269,8 +264,7 @@ if (fp == NULL) { | |||
269 | .Sh SEE ALSO | 264 | .Sh SEE ALSO |
270 | .Xr CONF_modules_free 3 , | 265 | .Xr CONF_modules_free 3 , |
271 | .Xr ERR 3 , | 266 | .Xr ERR 3 , |
272 | .Xr OPENSSL_config 3 , | 267 | .Xr OPENSSL_config 3 |
273 | .Xr OPENSSL_load_builtin_modules 3 | ||
274 | .Sh HISTORY | 268 | .Sh HISTORY |
275 | .Fn X509_get_default_cert_area | 269 | .Fn X509_get_default_cert_area |
276 | first appeared in SSLeay 0.4.1 and has been available since | 270 | first appeared in SSLeay 0.4.1 and has been available since |
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index b8dfe86d49..d026643e9d 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.308 2025/04/25 19:57:12 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.309 2025/06/09 12:43:53 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -216,7 +216,6 @@ MAN= \ | |||
216 | IPAddressRange_new.3 \ | 216 | IPAddressRange_new.3 \ |
217 | MD5.3 \ | 217 | MD5.3 \ |
218 | NAME_CONSTRAINTS_new.3 \ | 218 | NAME_CONSTRAINTS_new.3 \ |
219 | OBJ_NAME_add.3 \ | ||
220 | OBJ_create.3 \ | 219 | OBJ_create.3 \ |
221 | OBJ_find_sigid_algs.3 \ | 220 | OBJ_find_sigid_algs.3 \ |
222 | OBJ_nid2obj.3 \ | 221 | OBJ_nid2obj.3 \ |
@@ -232,7 +231,6 @@ MAN= \ | |||
232 | OPENSSL_cleanse.3 \ | 231 | OPENSSL_cleanse.3 \ |
233 | OPENSSL_config.3 \ | 232 | OPENSSL_config.3 \ |
234 | OPENSSL_init_crypto.3 \ | 233 | OPENSSL_init_crypto.3 \ |
235 | OPENSSL_load_builtin_modules.3 \ | ||
236 | OPENSSL_malloc.3 \ | 234 | OPENSSL_malloc.3 \ |
237 | OPENSSL_sk_new.3 \ | 235 | OPENSSL_sk_new.3 \ |
238 | OpenSSL_add_all_algorithms.3 \ | 236 | OpenSSL_add_all_algorithms.3 \ |
diff --git a/src/lib/libcrypto/man/OBJ_NAME_add.3 b/src/lib/libcrypto/man/OBJ_NAME_add.3 deleted file mode 100644 index 0b46010c49..0000000000 --- a/src/lib/libcrypto/man/OBJ_NAME_add.3 +++ /dev/null | |||
@@ -1,307 +0,0 @@ | |||
1 | .\" $OpenBSD: OBJ_NAME_add.3,v 1.6 2024/01/31 08:02:53 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@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: January 31 2024 $ | ||
18 | .Dt OBJ_NAME_ADD 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm OBJ_NAME_add , | ||
22 | .Nm OBJ_NAME_remove , | ||
23 | .Nm OBJ_NAME_get , | ||
24 | .Nm OBJ_NAME_new_index , | ||
25 | .Nm OBJ_NAME_init , | ||
26 | .Nm OBJ_NAME_cleanup | ||
27 | .Nd global associative array | ||
28 | .Sh SYNOPSIS | ||
29 | .In openssl/objects.h | ||
30 | .Ft int | ||
31 | .Fo OBJ_NAME_add | ||
32 | .Fa "const char *name" | ||
33 | .Fa "int type" | ||
34 | .Fa "const char *value" | ||
35 | .Fc | ||
36 | .Ft int | ||
37 | .Fo OBJ_NAME_remove | ||
38 | .Fa "const char *name" | ||
39 | .Fa "int type" | ||
40 | .Fc | ||
41 | .Ft const char * | ||
42 | .Fo OBJ_NAME_get | ||
43 | .Fa "const char *name" | ||
44 | .Fa "int type" | ||
45 | .Fc | ||
46 | .Ft int | ||
47 | .Fo OBJ_NAME_new_index | ||
48 | .Fa "unsigned long (*hash_func)(const char *name)" | ||
49 | .Fa "int (*cmp_func)(const char *name1, const char *name2)" | ||
50 | .Fa "void (*free_func)(const char *name, int type, const char *value)" | ||
51 | .Fc | ||
52 | .Ft int | ||
53 | .Fn OBJ_NAME_init void | ||
54 | .Ft void | ||
55 | .Fn OBJ_NAME_cleanup "int type" | ||
56 | .Bd -literal | ||
57 | typedef struct { | ||
58 | int type; | ||
59 | int alias; | ||
60 | const char *name; | ||
61 | const char *data; | ||
62 | } OBJ_NAME; | ||
63 | .Ed | ||
64 | .Sh DESCRIPTION | ||
65 | These functions implement a single, static associative array | ||
66 | with the following properties: | ||
67 | .Bl -bullet | ||
68 | .It | ||
69 | The keys are ordered pairs consisting of a NUL-terminated string | ||
70 | .Pq called the Fa name | ||
71 | and an | ||
72 | .Vt int | ||
73 | number | ||
74 | .Pq called the Fa type . | ||
75 | Two types are predefined and used internally by the library: | ||
76 | .Dv OBJ_NAME_TYPE_MD_METH | ||
77 | and | ||
78 | .Dv OBJ_NAME_TYPE_CIPHER_METH . | ||
79 | Two additional types are predefined but not used internally: | ||
80 | .Dv OBJ_NAME_TYPE_PKEY_METH | ||
81 | and | ||
82 | .Dv OBJ_NAME_TYPE_COMP_METH . | ||
83 | All predefined types are greater than | ||
84 | .Dv OBJ_NAME_TYPE_UNDEF | ||
85 | and smaller than | ||
86 | .Dv OBJ_NAME_TYPE_NUM . | ||
87 | .It | ||
88 | The values are pointers. | ||
89 | Formally, they are of the type | ||
90 | .Vt const char * , | ||
91 | but in practice, pointers of other types, for example | ||
92 | .Vt EVP_CIPHER * | ||
93 | or | ||
94 | .Vt EVP_MD * , | ||
95 | are often stored as values | ||
96 | and cast back to the correct type on retrieval. | ||
97 | .It | ||
98 | The array supports type-specific aliases for names. | ||
99 | .El | ||
100 | .Pp | ||
101 | .Fn OBJ_NAME_add | ||
102 | removes the key-value pair or alias with the key | ||
103 | .Pq Fa name , type | ||
104 | in the same way as | ||
105 | .Fn OBJ_NAME_remove | ||
106 | and inserts a key-value pair with the specified | ||
107 | .Fa name , | ||
108 | .Fa type , | ||
109 | and | ||
110 | .Fa value . | ||
111 | If the bit | ||
112 | .Dv OBJ_NAME_ALIAS | ||
113 | is set in the | ||
114 | .Fa type | ||
115 | argument, that bit is cleared before using the | ||
116 | .Fa type | ||
117 | and the key | ||
118 | .Pq Fa name , type | ||
119 | becomes an alias for the key | ||
120 | .Pq Fa value , type | ||
121 | instead of setting a value. | ||
122 | It is not checked whether the key | ||
123 | .Pq Fa value , type | ||
124 | already exists. | ||
125 | Consequently, it is possible to define an alias | ||
126 | before setting the associated value. | ||
127 | .Pp | ||
128 | .Fn OBJ_NAME_remove | ||
129 | removes the key-value pair or alias with the key | ||
130 | .Pq Fa name , type | ||
131 | from the array, if it exists. | ||
132 | Otherwise, it has no effect. | ||
133 | If the bit | ||
134 | .Dv OBJ_NAME_ALIAS | ||
135 | is set in the | ||
136 | .Fa type | ||
137 | argument, it is ignored and cleared before using the | ||
138 | .Fa type . | ||
139 | If the | ||
140 | .Fa type | ||
141 | is an application-defined type added with | ||
142 | .Fn OBJ_NAME_new_index | ||
143 | and the | ||
144 | .Fa free_func | ||
145 | associated with the | ||
146 | .Fa type | ||
147 | is not a | ||
148 | .Dv NULL | ||
149 | pointer, it is called with the | ||
150 | .Fa name , | ||
151 | .Fa type , | ||
152 | and | ||
153 | .Fa value | ||
154 | of the key-value pair being removed or with the | ||
155 | .Fa name , | ||
156 | .Fa type , | ||
157 | and alias target name of the alias being removed. | ||
158 | In typical usage, this function might free the | ||
159 | .Fa name , | ||
160 | and it might free the | ||
161 | .Fa value | ||
162 | in a type-specific way. | ||
163 | .Pp | ||
164 | .Fn OBJ_NAME_get | ||
165 | looks up the key | ||
166 | .Pq Fa name , type , | ||
167 | recursively resolving up to ten aliases if needed. | ||
168 | If the bit | ||
169 | .Dv OBJ_NAME_ALIAS | ||
170 | is set in the | ||
171 | .Fa type | ||
172 | argument, it is cleared before using the | ||
173 | .Fa type , | ||
174 | processing of aliases is disabled, and if | ||
175 | .Pq Fa name , type | ||
176 | is an alias, the target name of the alias is returned instead of a value. | ||
177 | .Pp | ||
178 | .Fn OBJ_NAME_new_index | ||
179 | assigns the smallest unassigned positive integer number | ||
180 | to represent a new, application-defined | ||
181 | .Fa type . | ||
182 | The three function pointers will be used, respectively, | ||
183 | to hash a name for this type, to compare two names for this type, | ||
184 | and to free the contents of a key-value pair holding the given | ||
185 | .Fa name , | ||
186 | .Fa type , | ||
187 | and | ||
188 | .Fa value . | ||
189 | If the | ||
190 | .Fa hash_func | ||
191 | argument is a | ||
192 | .Dv NULL | ||
193 | pointer, | ||
194 | .Xr lh_strhash 3 | ||
195 | is used instead. | ||
196 | If the | ||
197 | .Fa cmp_func | ||
198 | argument is a | ||
199 | .Dv NULL | ||
200 | pointer, | ||
201 | .Xr strcmp 3 | ||
202 | is used instead. | ||
203 | If the | ||
204 | .Fa free_func | ||
205 | argument is a | ||
206 | .Dv NULL | ||
207 | pointer, the | ||
208 | .Fa name | ||
209 | and | ||
210 | .Fa value | ||
211 | pointers contained in the key-value pair are not freed, | ||
212 | only the structure representing the pair itself is. | ||
213 | This default behaviour is also used for the built-in types. | ||
214 | .Pp | ||
215 | .Fn OBJ_NAME_init | ||
216 | initializes the array. | ||
217 | After initialization, the array is empty. | ||
218 | Calling | ||
219 | .Fn OBJ_NAME_init | ||
220 | when the array is already initialized has no effect. | ||
221 | Application programs do not need to call this function because | ||
222 | .Fn OBJ_NAME_add | ||
223 | and | ||
224 | .Fn OBJ_NAME_get | ||
225 | automatically call it whenever needed. | ||
226 | .Pp | ||
227 | .Fn OBJ_NAME_cleanup | ||
228 | removes all key-value pairs and aliases of the given | ||
229 | .Fa type | ||
230 | from the array by calling | ||
231 | .Fn OBJ_NAME_remove | ||
232 | on every such pair and alias. | ||
233 | If the | ||
234 | .Fa type | ||
235 | argument is negative, it removes all key-value pairs and aliases | ||
236 | of any type and also reverses all effects of | ||
237 | .Fn OBJ_NAME_new_index | ||
238 | and | ||
239 | .Fn OBJ_NAME_init , | ||
240 | in particular resetting the list of types to the predefined types | ||
241 | and releasing all memory reserved by these functions. | ||
242 | .Pp | ||
243 | The | ||
244 | .Vt OBJ_NAME | ||
245 | structure represents one key-value pair or one alias with the key | ||
246 | .Pq Fa name , type . | ||
247 | If the | ||
248 | .Fa alias | ||
249 | field is 0, the | ||
250 | .Fa data | ||
251 | field contains the value; otherwise, it contains the alias target name. | ||
252 | .Sh RETURN VALUES | ||
253 | .Fn OBJ_NAME_add | ||
254 | and | ||
255 | .Fn OBJ_NAME_init | ||
256 | return 1 on success or 0 if memory allocation fails. | ||
257 | .Pp | ||
258 | .Fn OBJ_NAME_remove | ||
259 | returns 1 if one key-value pair or alias was removed or 0 otherwise. | ||
260 | .Pp | ||
261 | .Fn OBJ_NAME_get | ||
262 | returns the | ||
263 | .Fa value | ||
264 | associated with the key | ||
265 | .Pq Fa name , type | ||
266 | or | ||
267 | .Dv NULL | ||
268 | if | ||
269 | .Fa name | ||
270 | is | ||
271 | .Dv NULL , | ||
272 | if the array does not contain a value for this key, | ||
273 | or if more than ten aliases are encountered before finding a value. | ||
274 | .Pp | ||
275 | .Fn OBJ_NAME_new_index | ||
276 | returns a positive integer greater than or equal to | ||
277 | .Dv OBJ_NAME_TYPE_NUM | ||
278 | representing the new type or 0 if memory allocation fails. | ||
279 | .Sh SEE ALSO | ||
280 | .Xr EVP_cleanup 3 , | ||
281 | .Xr EVP_get_cipherbyname 3 , | ||
282 | .Xr EVP_get_digestbyname 3 , | ||
283 | .Xr lh_new 3 , | ||
284 | .Xr OBJ_create 3 , | ||
285 | .Xr OBJ_nid2obj 3 | ||
286 | .Sh BUGS | ||
287 | Calling | ||
288 | .Fn OBJ_NAME_get | ||
289 | with the bit | ||
290 | .Dv OBJ_NAME_ALIAS | ||
291 | is not very useful because there is no way to tell | ||
292 | whether the returned pointer points to a value or to a name, | ||
293 | short of calling the function again without setting the bit | ||
294 | and comparing the two returned pointers. | ||
295 | .Pp | ||
296 | The | ||
297 | .Fa free_func | ||
298 | has no way to tell whether its | ||
299 | .Fa value | ||
300 | argument is indeed of the given | ||
301 | .Fa type | ||
302 | or whether it is merely the target name of an alias. | ||
303 | Consequently, to use values of a type | ||
304 | that requires more cleanup than merely calling | ||
305 | .Xr free 3 | ||
306 | on it, instances of the type need to begin with a magic number or string | ||
307 | that cannot occur at the beginning of a name. | ||
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3 index 6af0ae0dcb..e21b9817de 100644 --- a/src/lib/libcrypto/man/OPENSSL_config.3 +++ b/src/lib/libcrypto/man/OPENSSL_config.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OPENSSL_config.3,v 1.17 2025/06/08 22:40:30 schwarze Exp $ | 1 | .\" $OpenBSD: OPENSSL_config.3,v 1.18 2025/06/09 12:43:53 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
@@ -65,7 +65,7 @@ | |||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
67 | .\" | 67 | .\" |
68 | .Dd $Mdocdate: June 8 2025 $ | 68 | .Dd $Mdocdate: June 9 2025 $ |
69 | .Dt OPENSSL_CONFIG 3 | 69 | .Dt OPENSSL_CONFIG 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -118,13 +118,11 @@ To use a non-standard configuration file, refer to | |||
118 | Internally, | 118 | Internally, |
119 | .Fn OPENSSL_config | 119 | .Fn OPENSSL_config |
120 | calls | 120 | calls |
121 | .Xr OPENSSL_init_crypto 3 | 121 | .Xr OPENSSL_init_crypto 3 . |
122 | and | ||
123 | .Xr OPENSSL_load_builtin_modules 3 . | ||
124 | .Pp | 122 | .Pp |
125 | If an application is compiled with the preprocessor symbol | 123 | If an application is compiled with the preprocessor symbol |
126 | .Dv OPENSSL_LOAD_CONF | 124 | .Dv OPENSSL_LOAD_CONF |
127 | #define'd, | 125 | defined, |
128 | .Xr OpenSSL_add_all_algorithms 3 | 126 | .Xr OpenSSL_add_all_algorithms 3 |
129 | automatically calls | 127 | automatically calls |
130 | .Fn OPENSSL_config . | 128 | .Fn OPENSSL_config . |
@@ -141,7 +139,6 @@ standard configuration file | |||
141 | .Xr CONF_modules_free 3 , | 139 | .Xr CONF_modules_free 3 , |
142 | .Xr CONF_modules_load_file 3 , | 140 | .Xr CONF_modules_load_file 3 , |
143 | .Xr crypto 3 , | 141 | .Xr crypto 3 , |
144 | .Xr OPENSSL_load_builtin_modules 3 , | ||
145 | .Xr OPENSSL_VERSION_NUMBER 3 , | 142 | .Xr OPENSSL_VERSION_NUMBER 3 , |
146 | .Xr openssl.cnf 5 , | 143 | .Xr openssl.cnf 5 , |
147 | .Xr x509v3.cnf 5 | 144 | .Xr x509v3.cnf 5 |
diff --git a/src/lib/libcrypto/man/OPENSSL_init_crypto.3 b/src/lib/libcrypto/man/OPENSSL_init_crypto.3 index 72a3059c8d..5c29d55aa9 100644 --- a/src/lib/libcrypto/man/OPENSSL_init_crypto.3 +++ b/src/lib/libcrypto/man/OPENSSL_init_crypto.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OPENSSL_init_crypto.3,v 1.6 2025/06/08 22:40:30 schwarze Exp $ | 1 | .\" $OpenBSD: OPENSSL_init_crypto.3,v 1.7 2025/06/09 12:43:53 schwarze Exp $ |
2 | .\" Copyright (c) 2018, 2020 Ingo Schwarze <schwarze@openbsd.org> | 2 | .\" Copyright (c) 2018, 2020 Ingo Schwarze <schwarze@openbsd.org> |
3 | .\" | 3 | .\" |
4 | .\" Permission to use, copy, modify, and distribute this software for any | 4 | .\" Permission to use, copy, modify, and distribute this software for any |
@@ -13,7 +13,7 @@ | |||
13 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 13 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
14 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | .\" | 15 | .\" |
16 | .Dd $Mdocdate: June 8 2025 $ | 16 | .Dd $Mdocdate: June 9 2025 $ |
17 | .Dt OPENSSL_INIT_CRYPTO 3 | 17 | .Dt OPENSSL_INIT_CRYPTO 3 |
18 | .Os | 18 | .Os |
19 | .Sh NAME | 19 | .Sh NAME |
@@ -55,10 +55,7 @@ If | |||
55 | is called before any other crypto or ssl functions, the crypto | 55 | is called before any other crypto or ssl functions, the crypto |
56 | library is initialised by allocating various internal resources, | 56 | library is initialised by allocating various internal resources, |
57 | in particular calling | 57 | in particular calling |
58 | .Xr ERR_load_crypto_strings 3 , | 58 | .Xr ERR_load_crypto_strings 3 . |
59 | .Xr OpenSSL_add_all_ciphers 3 , | ||
60 | and | ||
61 | .Xr OpenSSL_add_all_digests 3 . | ||
62 | .Pp | 59 | .Pp |
63 | The following | 60 | The following |
64 | .Fa options | 61 | .Fa options |
@@ -93,7 +90,6 @@ is intended to return 1 on success or 0 on error. | |||
93 | .Sh SEE ALSO | 90 | .Sh SEE ALSO |
94 | .Xr CONF_modules_load_file 3 , | 91 | .Xr CONF_modules_load_file 3 , |
95 | .Xr OPENSSL_config 3 , | 92 | .Xr OPENSSL_config 3 , |
96 | .Xr OPENSSL_load_builtin_modules 3 , | ||
97 | .Xr openssl.cnf 5 | 93 | .Xr openssl.cnf 5 |
98 | .Sh HISTORY | 94 | .Sh HISTORY |
99 | .Fn OPENSSL_init | 95 | .Fn OPENSSL_init |
diff --git a/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 b/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 deleted file mode 100644 index 2b20efaf0e..0000000000 --- a/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | .\" $OpenBSD: OPENSSL_load_builtin_modules.3,v 1.8 2023/12/05 02:41:13 jsg Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
5 | .\" Copyright (c) 2004, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: December 5 2023 $ | ||
52 | .Dt OPENSSL_LOAD_BUILTIN_MODULES 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm OPENSSL_load_builtin_modules , | ||
56 | .Nm ASN1_add_oid_module | ||
57 | .Nd add standard configuration modules | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/conf.h | ||
60 | .Ft void | ||
61 | .Fn OPENSSL_load_builtin_modules void | ||
62 | .Ft void | ||
63 | .Fn ASN1_add_oid_module void | ||
64 | .Sh DESCRIPTION | ||
65 | The function | ||
66 | .Fn OPENSSL_load_builtin_modules | ||
67 | adds all the standard OpenSSL configuration modules to the internal | ||
68 | list. | ||
69 | They can then be used by the OpenSSL configuration code. | ||
70 | .Pp | ||
71 | .Fn ASN1_add_oid_module | ||
72 | adds just the ASN.1 OBJECT module. | ||
73 | .Pp | ||
74 | If the simple configuration function | ||
75 | .Xr OPENSSL_config 3 | ||
76 | is called then | ||
77 | .Fn OPENSSL_load_builtin_modules | ||
78 | is called automatically. | ||
79 | .Pp | ||
80 | Applications which use configuration functions like | ||
81 | .Xr CONF_modules_load_file 3 | ||
82 | directly need to call | ||
83 | .Fn OPENSSL_load_builtin_modules | ||
84 | themselves | ||
85 | .Em before | ||
86 | any other configuration code. | ||
87 | .Pp | ||
88 | Applications should call | ||
89 | .Xr OPENSSL_config 3 | ||
90 | or | ||
91 | .Fn OPENSSL_load_builtin_modules | ||
92 | to load all configuration modules instead of adding modules selectively: | ||
93 | otherwise functionality may be missing from the application when | ||
94 | new modules are added. | ||
95 | .Sh SEE ALSO | ||
96 | .Xr CONF_modules_load_file 3 , | ||
97 | .Xr OPENSSL_config 3 | ||
98 | .Sh HISTORY | ||
99 | These functions first appeared in OpenSSL 0.9.7 | ||
100 | and have been available since | ||
101 | .Ox 3.2 . | ||
diff --git a/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 b/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 index ff1c3df6d9..64f71590fe 100644 --- a/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 +++ b/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.17 2025/06/08 22:40:30 schwarze Exp $ | 1 | .\" $OpenBSD: OpenSSL_add_all_algorithms.3,v 1.18 2025/06/09 12:43:53 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400 | 2 | .\" full merge up to: OpenSSL b3696a55 Sep 2 09:35:50 2017 -0400 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
@@ -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: June 8 2025 $ | 51 | .Dd $Mdocdate: June 9 2025 $ |
52 | .Dt OPENSSL_ADD_ALL_ALGORITHMS 3 | 52 | .Dt OPENSSL_ADD_ALL_ALGORITHMS 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -80,17 +80,21 @@ | |||
80 | These functions are deprecated. | 80 | These functions are deprecated. |
81 | It is never useful for any application program | 81 | It is never useful for any application program |
82 | to call any of them explicitly. | 82 | to call any of them explicitly. |
83 | The library automatically calls them internally whenever needed. | ||
84 | .Pp | 83 | .Pp |
85 | OpenSSL keeps an internal table of digest algorithms and ciphers. | 84 | The library contains internal tables of digest algorithms and ciphers. |
86 | It uses this table to look up ciphers via functions such as | 85 | It uses these tables to look up digests and ciphers via |
87 | .Xr EVP_get_cipherbyname 3 . | 86 | .Xr EVP_get_digestbyname 3 |
87 | and | ||
88 | .Xr EVP_get_cipherbyname 3 , | ||
89 | respectively. | ||
90 | In LibreSSL, these tables are static constants and do not require | ||
91 | initialization. | ||
88 | .Pp | 92 | .Pp |
89 | .Fn OpenSSL_add_all_algorithms | 93 | .Fn OpenSSL_add_all_algorithms |
90 | adds all algorithms to the table (digests and ciphers). | 94 | adds all algorithms to the table (digests and ciphers). |
91 | If an application is compiled with the preprocessor symbol | 95 | If an application is compiled with the preprocessor symbol |
92 | .Dv OPENSSL_LOAD_CONF | 96 | .Dv OPENSSL_LOAD_CONF |
93 | #define'd, it also calls | 97 | defined, it also calls |
94 | .Xr OPENSSL_config 3 | 98 | .Xr OPENSSL_config 3 |
95 | with a | 99 | with a |
96 | .Dv NULL | 100 | .Dv NULL |
@@ -103,17 +107,9 @@ adds all digest algorithms to the table. | |||
103 | adds all encryption algorithms to the table including password based | 107 | adds all encryption algorithms to the table including password based |
104 | encryption algorithms. | 108 | encryption algorithms. |
105 | .Pp | 109 | .Pp |
106 | If any of the above functions is called more than once, | ||
107 | only the first call has an effect. | ||
108 | .Pp | ||
109 | .Fn EVP_cleanup | 110 | .Fn EVP_cleanup |
110 | removes all ciphers and digests from the table and also calls | 111 | has no effect; it used to remove various kinds of application-supplied |
111 | .Xr OBJ_NAME_cleanup 3 | 112 | data that is no longer supported in the first place. |
112 | with an argument of \-1 , | ||
113 | thus resetting the global associative array of names | ||
114 | and all signature algorithm definitions to their default states, | ||
115 | removing all application-defined types, key-value pairs, and aliases, | ||
116 | including any that are unrelated to the EVP library. | ||
117 | .Pp | 113 | .Pp |
118 | .Fn SSLeay_add_all_algorithms | 114 | .Fn SSLeay_add_all_algorithms |
119 | is a deprecated alias for | 115 | is a deprecated alias for |
@@ -127,8 +123,6 @@ are implemented as macros. | |||
127 | .Xr evp 3 , | 123 | .Xr evp 3 , |
128 | .Xr EVP_DigestInit 3 , | 124 | .Xr EVP_DigestInit 3 , |
129 | .Xr EVP_EncryptInit 3 , | 125 | .Xr EVP_EncryptInit 3 , |
130 | .Xr OBJ_cleanup 3 , | ||
131 | .Xr OBJ_NAME_add 3 , | ||
132 | .Xr OPENSSL_config 3 | 126 | .Xr OPENSSL_config 3 |
133 | .Sh HISTORY | 127 | .Sh HISTORY |
134 | .Fn EVP_cleanup , | 128 | .Fn EVP_cleanup , |
@@ -149,5 +143,3 @@ first appeared in OpenSSL 0.9.5 and have been available since | |||
149 | .Sh BUGS | 143 | .Sh BUGS |
150 | Although the functions do not return error codes, it is possible for them | 144 | Although the functions do not return error codes, it is possible for them |
151 | to fail. | 145 | to fail. |
152 | This will only happen as a result of a memory allocation failure so this | ||
153 | is not too much of a problem in practice. | ||