summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/ENGINE_add.3243
-rw-r--r--src/lib/libcrypto/man/ENGINE_ctrl.3470
-rw-r--r--src/lib/libcrypto/man/ENGINE_get_default_RSA.3151
-rw-r--r--src/lib/libcrypto/man/ENGINE_init.3134
-rw-r--r--src/lib/libcrypto/man/ENGINE_register_RSA.3142
-rw-r--r--src/lib/libcrypto/man/ENGINE_register_all_RSA.3123
-rw-r--r--src/lib/libcrypto/man/ENGINE_set_RSA.3317
-rw-r--r--src/lib/libcrypto/man/ENGINE_set_default.3186
-rw-r--r--src/lib/libcrypto/man/ENGINE_set_flags.392
-rw-r--r--src/lib/libcrypto/man/ENGINE_unregister_RSA.3119
-rw-r--r--src/lib/libcrypto/man/Makefile12
11 files changed, 1 insertions, 1988 deletions
diff --git a/src/lib/libcrypto/man/ENGINE_add.3 b/src/lib/libcrypto/man/ENGINE_add.3
deleted file mode 100644
index 4ae878b4f5..0000000000
--- a/src/lib/libcrypto/man/ENGINE_add.3
+++ /dev/null
@@ -1,243 +0,0 @@
1.\" $OpenBSD: ENGINE_add.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $
2.\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
3.\"
4.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.Dd $Mdocdate: April 18 2018 $
19.Dt ENGINE_ADD 3
20.Os
21.Sh NAME
22.Nm ENGINE_add ,
23.Nm ENGINE_set_id ,
24.Nm ENGINE_get_id ,
25.Nm ENGINE_set_name ,
26.Nm ENGINE_get_name ,
27.Nm ENGINE_remove ,
28.Nm ENGINE_cleanup ,
29.Nm ENGINE_get_first ,
30.Nm ENGINE_get_last ,
31.Nm ENGINE_get_next ,
32.Nm ENGINE_get_prev ,
33.Nm ENGINE_by_id
34.Nd maintain a global list of ENGINE objects
35.Sh SYNOPSIS
36.In openssl/engine.h
37.Ft int
38.Fo ENGINE_add
39.Fa "ENGINE *e"
40.Fc
41.Ft int
42.Fo ENGINE_set_id
43.Fa "ENGINE *e"
44.Fa "const char *id"
45.Fc
46.Ft const char *
47.Fo ENGINE_get_id
48.Fa "const ENGINE *e"
49.Fc
50.Ft int
51.Fo ENGINE_set_name
52.Fa "ENGINE *e"
53.Fa "const char *name"
54.Fc
55.Ft const char *
56.Fo ENGINE_get_name
57.Fa "const ENGINE *e"
58.Fc
59.Ft int
60.Fo ENGINE_remove
61.Fa "ENGINE *e"
62.Fc
63.Ft void
64.Fn ENGINE_cleanup void
65.Ft ENGINE *
66.Fn ENGINE_get_first void
67.Ft ENGINE *
68.Fn ENGINE_get_last void
69.Ft ENGINE *
70.Fo ENGINE_get_next
71.Fa "ENGINE *e"
72.Fc
73.Ft ENGINE *
74.Fo ENGINE_get_prev
75.Fa "ENGINE *e"
76.Fc
77.Ft ENGINE *
78.Fo ENGINE_by_id
79.Fa "const char *id"
80.Fc
81.Sh DESCRIPTION
82The crypto library maintains a global list of
83.Vt ENGINE
84objects.
85.Pp
86.Fn ENGINE_add
87appends
88.Fa e
89to the end of the list
90and increments its structural reference count by 1.
91A unique identifier and a name of
92.Fa e
93have to be set with
94.Fn ENGINE_set_id
95and
96.Fn ENGINE_set_name
97before calling this function.
98.Fn ENGINE_add
99fails if the list already contains an
100.Vt ENGINE
101with the same identifier.
102.Pp
103.Fn ENGINE_remove
104removes
105.Fa e
106from the list.
107If successful, it calls
108.Xr ENGINE_free 3
109on
110.Fa e .
111.Pp
112.Fn ENGINE_cleanup
113calls
114.Xr ENGINE_finish 3
115on all
116.Vt ENGINE
117objects that were selected as default engines, for example using the
118functions documented in the
119.Xr ENGINE_set_default 3
120and
121.Xr ENGINE_get_default_RSA 3
122manual pages, and it calls
123.Fn ENGINE_remove
124on all
125.Vt ENGINE
126objects that were added to the global list with
127.Fn ENGINE_add .
128Calling this function is required at the end of each program using
129.Fn ENGINE_add ,
130even if no engines are explicitly registered or used.
131.Pp
132.Fn ENGINE_get_first
133and
134.Fn ENGINE_get_last
135provide access to the first and last
136.Vt ENGINE
137object on the list, respectively.
138Unless the list is empty, they increment the structural reference
139count of the retrieved object by 1.
140.Pp
141.Fn ENGINE_get_next
142and
143.Fn ENGINE_get_prev
144support iteration of the list.
145They always call
146.Xr ENGINE_free 3
147on
148.Fa e .
149Unless the end of the list is reached, they increment the structural
150reference count of the retrieved object by 1.
151.Pp
152.Fn ENGINE_by_id
153searches the list for an
154.Vt ENGINE
155object with a matching
156.Fa id .
157If found, it increments the structural reference count of the
158retrieved object by 1.
159If
160.Dv ENGINE_FLAGS_BY_ID_COPY
161was set on
162.Fa e
163with
164.Xr ENGINE_set_flags 3 ,
165it returns a shallow copy of the object rather than incrementing
166the reference count and returning a pointer to the original.
167.Sh RETURN VALUES
168.Fn ENGINE_add ,
169.Fn ENGINE_set_id ,
170.Fn ENGINE_set_name ,
171and
172.Fn ENGINE_remove
173return 1 on success or 0 on error.
174.Fn ENGINE_set_id
175and
176.Fn ENGINE_set_name
177can only fail if the supplied
178.Fa id
179or
180.Fa name
181is
182.Dv NULL .
183.Pp
184.Fn ENGINE_get_id
185and
186.Fn ENGINE_get_name
187return a pointer to an internal string
188representing the identifier and the name of
189.Fa e ,
190respectively.
191.Pp
192.Fn ENGINE_get_first
193and
194.Fn ENGINE_get_last
195return an
196.Vt ENGINE
197object or
198.Dv NULL
199if the list is empty.
200.Pp
201.Fn ENGINE_get_next
202and
203.Fn ENGINE_get_prev
204return an
205.Vt ENGINE
206object or
207.Dv NULL
208when the end of the list is reached.
209.Pp
210.Fn ENGINE_by_id
211returns an
212.Vt ENGINE
213object or
214.Dv NULL
215if no matching object is found.
216.Sh SEE ALSO
217.Xr ENGINE_get_default_RSA 3 ,
218.Xr ENGINE_init 3 ,
219.Xr ENGINE_new 3 ,
220.Xr ENGINE_register_all_RSA 3 ,
221.Xr ENGINE_register_RSA 3 ,
222.Xr ENGINE_set_default 3 ,
223.Xr ENGINE_set_flags 3 ,
224.Xr ENGINE_unregister_RSA 3
225.Sh HISTORY
226.Fn ENGINE_add ,
227.Fn ENGINE_set_id ,
228.Fn ENGINE_get_id ,
229.Fn ENGINE_set_name ,
230.Fn ENGINE_get_name ,
231.Fn ENGINE_remove ,
232.Fn ENGINE_get_first ,
233.Fn ENGINE_get_last ,
234.Fn ENGINE_get_next ,
235.Fn ENGINE_get_prev ,
236and
237.Fn ENGINE_by_id
238first appeared in OpenSSL 0.9.7 and have been available since
239.Ox 2.9 .
240.Pp
241.Fn ENGINE_cleanup
242first appeared in OpenSSL 0.9.7 and has been available since
243.Ox 3.2 .
diff --git a/src/lib/libcrypto/man/ENGINE_ctrl.3 b/src/lib/libcrypto/man/ENGINE_ctrl.3
deleted file mode 100644
index b4965a5a03..0000000000
--- a/src/lib/libcrypto/man/ENGINE_ctrl.3
+++ /dev/null
@@ -1,470 +0,0 @@
1.\" $OpenBSD: ENGINE_ctrl.3,v 1.5 2022/01/15 23:38:50 jsg Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: January 15 2022 $
20.Dt ENGINE_CTRL 3
21.Os
22.Sh NAME
23.Nm ENGINE_ctrl ,
24.Nm ENGINE_cmd_is_executable ,
25.Nm ENGINE_ctrl_cmd ,
26.Nm ENGINE_ctrl_cmd_string ,
27.Nm ENGINE_set_ctrl_function ,
28.Nm ENGINE_get_ctrl_function ,
29.Nm ENGINE_set_cmd_defns ,
30.Nm ENGINE_get_cmd_defns
31.Nd control commands for ENGINE objects
32.Sh SYNOPSIS
33.In openssl/engine.h
34.Ft int
35.Fo ENGINE_ctrl
36.Fa "ENGINE *e"
37.Fa "int cmd"
38.Fa "long i"
39.Fa "void *p"
40.Fa "void (*f)(void)"
41.Fc
42.Ft int
43.Fo ENGINE_cmd_is_executable
44.Fa "ENGINE *e"
45.Fa "int cmd"
46.Fc
47.Ft int
48.Fo ENGINE_ctrl_cmd
49.Fa "ENGINE *e"
50.Fa "const char *cmd_name"
51.Fa "long i"
52.Fa "void *p"
53.Fa "void (*f)(void)"
54.Fa "int cmd_optional"
55.Fc
56.Ft int
57.Fo ENGINE_ctrl_cmd_string
58.Fa "ENGINE *e"
59.Fa "const char *cmd_name"
60.Fa "const char *arg"
61.Fa "int cmd_optional"
62.Fc
63.Ft typedef int
64.Fo (*ENGINE_CTRL_FUNC_PTR)
65.Fa "ENGINE *e"
66.Fa "int cmd"
67.Fa "long i"
68.Fa "void *p"
69.Fa "void (*f)(void)"
70.Fc
71.Ft int
72.Fo ENGINE_set_ctrl_function
73.Fa "ENGINE *e"
74.Fa "ENGINE_CTRL_FUNC_PTR ctrl_f"
75.Fc
76.Ft ENGINE_CTRL_FUNC_PTR
77.Fo ENGINE_get_ctrl_function
78.Fa "const ENGINE *e"
79.Fc
80.Ft int
81.Fo ENGINE_set_cmd_defns
82.Fa "ENGINE *e"
83.Fa "const ENGINE_CMD_DEFN *defns"
84.Fc
85.Ft const ENGINE_CMD_DEFN *
86.Fo ENGINE_get_cmd_defns
87.Fa "const ENGINE *e"
88.Fc
89.Sh DESCRIPTION
90.Fn ENGINE_ctrl
91calls the built-in or user-defined
92.Fa cmd
93for the engine
94.Fa e ,
95passing the arguments
96.Fa i
97and
98.Fa p .
99.Pp
100User-defined commands can be used before
101.Xr ENGINE_init 3
102to provide data required for initialization
103or at any time to modify the behaviour of an engine.
104.Pp
105Most built-in commands operate on user-defined commands installed with
106.Fn ENGINE_set_cmd_defns ,
107either using the
108.Fa p
109argument to indicate the user-defined command with the command name
110.Fa cmd_name
111or using the
112.Fa i
113argument to indicate the user-defined command with the command number
114.Fa cmd_num .
115The
116.Fa cmd
117arguments to call the built-in commands are as follows:
118.Bl -tag -width Ds
119.It Dv ENGINE_CTRL_GET_CMD_FLAGS
120Return the
121.Fa cmd_flags
122of the user-defined command with the number
123.Fa i ,
124or a number less than or equal to 0 if an error occurs or
125the command number does not exist.
126A return value of 0 indicates failure if
127.Fa e
128is
129.Dv NULL
130or has a reference count of 0, or success if
131.Fa e
132is valid.
133.It Dv ENGINE_CTRL_GET_CMD_FROM_NAME
134Return the positive command number
135of the user-defined command with the name
136.Fa p ,
137or a number less than or equal to 0 if an error occurs or no
138matching name is found.
139.It Dv ENGINE_CTRL_GET_DESC_FROM_CMD
140Copy the description of the user-defined command with the number
141.Fa i
142into the buffer
143.Fa p
144and NUL-terminate it.
145It is the responsibility of the caller to make sure that the buffer
146.Fa p
147is large enough, either by calling
148.Dv ENGINE_CTRL_GET_DESC_LEN_FROM_CMD
149first or using knowledge about the array passed to
150.Fn ENGINE_set_cmd_defns .
151The return value is the number of bytes written
152.Em including
153the terminating NUL byte, or a number less than or equal to 0
154if an error occurs.
155.It Dv ENGINE_CTRL_GET_DESC_LEN_FROM_CMD
156Return the length in bytes
157.Em excluding
158the terminating NUL byte
159of the description of the user-defined command with the number
160.Fa i ,
161or a number less than or equal to 0 if an error occurs.
162A return value of 0 indicates failure if
163.Fa e
164is
165.Dv NULL
166or has a reference count of 0, or success if
167.Fa e
168is valid.
169.It Dv ENGINE_CTRL_GET_FIRST_CMD_TYPE
170Return the positive command number
171of the first user-defined command installed with
172.Fn ENGINE_set_cmd_defns
173or a number less than or equal to 0 if an error occurs or no
174user-defined command has been installed.
175.It Dv ENGINE_CTRL_GET_NAME_FROM_CMD
176Copy the name of the user-defined command with the number
177.Fa i
178into the buffer
179.Fa p
180and NUL-terminate it.
181It is the responsibility of the caller to make sure that the buffer
182.Fa p
183is large enough, either by calling
184.Dv ENGINE_CTRL_GET_NAME_LEN_FROM_CMD
185first or using knowledge about the array passed to
186.Fn ENGINE_set_cmd_defns .
187The return value is the number of bytes written
188.Em including
189the terminating NUL byte, or a number less than or equal to 0
190if an error occurs.
191.It Dv ENGINE_CTRL_GET_NAME_LEN_FROM_CMD
192Return the length in bytes
193.Em excluding
194the terminating NULL byte
195of the name of the user-defined command with the number
196.Fa i ,
197or a number less than or equal to 0 if an error occurs.
198A return value of 0 indicates failure if
199.Fa e
200is
201.Dv NULL
202or has a reference count of 0, or success if
203.Fa e
204is valid.
205.It Dv ENGINE_CTRL_GET_NEXT_CMD_TYPE
206Return the positive command number of the next user-defined command
207after the user-defined command with the number
208.Fa i ,
209or a number less than or equal to 0 if an error occurs or if
210.Fa i
211is the last user-defined command.
212Together with
213.Dv ENGINE_CTRL_GET_FIRST_CMD_TYPE ,
214this can be used to iterate the user-defined commands installed with
215.Fn ENGINE_set_cmd_defns .
216.It Dv ENGINE_CTRL_HAS_CTRL_FUNCTION
217Return 1 if
218.Fa e
219has its own
220.Fa ctrl_f
221installed with
222.Fn ENGINE_set_ctrl_function
223or 0 otherwise.
224.El
225.Pp
226.Fn ENGINE_ctrl_cmd
227translates the
228.Fa cmd_name
229of a user-defined command to a
230.Fa cmd
231number and calls
232.Fn ENGINE_ctrl
233on it.
234If
235.Fa cmd_optional
236is non-zero, lack of a
237.Fa ctrl_f
238in
239.Fa e
240and translation failure with
241.Dv ENGINE_CTRL_GET_CMD_FROM_NAME
242are considered success, and the command has no effect.
243Otherwise, these problems cause
244.Fn ENGINE_ctrl_cmd
245to fail.
246.Pp
247Neither
248.Fn ENGINE_ctrl
249nor
250.Fn ENGINE_ctrl_cmd
251ever call the
252.Fa f
253callback, but merely pass it on as an argument to the engine-specific
254.Fa ctrl_f
255control function.
256It is up to
257.Fa ctrl_f
258how to use it, or alternatively to ignore it as well.
259.Pp
260.Fn ENGINE_ctrl_cmd_string
261translates the
262.Fa cmd_name
263of a user-defined command to a
264.Fa cmd
265number.
266If that command has the
267.Dv ENGINE_CMD_FLAG_NO_INPUT
268flag set,
269.Fa arg
270must be
271.Dv NULL
272and
273.Fn ENGINE_ctrl
274is called with
275.Fa i
276set to 0 and
277.Fa p
278set to
279.Dv NULL .
280Otherwise,
281.Fa arg
282must not be
283.Dv NULL .
284If the command accepts string input,
285.Fa i
286is set to 0 and
287.Fa arg
288is passed as the
289.Fa p
290argument to
291.Fn ENGINE_ctrl .
292Otherwise,
293.Fa arg
294is converted with
295.Xr strtol 3
296and passed as the
297.Fa i
298argument to
299.Fn ENGINE_ctrl ,
300setting
301.Fa p
302to
303.Dv NULL .
304.Pp
305.Fn ENGINE_set_ctrl_function
306installs
307.Fa ctrl_f
308as the engine-specific control function for
309.Fa e .
310Future calls to
311.Fn ENGINE_ctrl
312will call that function, passing on their arguments unchanged, if the
313.Fa cmd
314is not built-in to the library or if the
315.Dv ENGINE_FLAGS_MANUAL_CMD_CTRL
316flag is set in
317.Fa e .
318Let the
319.Fa ctrl_f
320return positive values on success or negative values on failure.
321Avoid return values of 0 because they cause dangerous ambiguity.
322In particular,
323.Fn ENGINE_ctrl_cmd
324and
325.Fn ENGINE_ctrl_cmd_string
326cannot be used with user-defined commands
327that may return 0 on success.
328.Pp
329.Fn ENGINE_set_cmd_defns
330install an array of command definitions in
331.Fa e .
332.Pp
333The structure
334.Vt ENGINE_CMD_DEFN
335has the following fields:
336.Bl -tag -width Ds
337.It Fa "unsigned int cmd_num"
338A positive, unique, monotonically increasing command number.
339Avoid using numbers below
340.Dv ENGINE_CMD_BASE .
341.It Fa "const char *cmd_name"
342The unique name of the command.
343.It Fa "const char *cmd_desc"
344A short description of the command.
345.It Fa "unsigned int cmd_flags"
346The bitwise OR of zero or more of the following flags:
347.Bl -tag -width Ds
348.It Dv ENGINE_CMD_FLAG_NUMERIC
349The command uses
350.Fa i .
351.It Dv ENGINE_CMD_FLAG_STRING
352The command uses
353.Fa p .
354.It Dv ENGINE_CMD_FLAG_NO_INPUT
355The command neither uses
356.Fa i
357nor
358.Fa p .
359.It Dv ENGINE_CMD_FLAG_INTERNAL
360This flag has no effect and is only provided for compatibility.
361.El
362.El
363.Pp
364The last element of
365.Fa defns
366does not specify a command, but must have a
367.Fa cmd_num
368of 0 and a
369.Fa cmd_name
370of
371.Dv NULL
372to indicate the end of the array.
373.Sh RETURN VALUES
374For
375.Fn ENGINE_ctrl ,
376positive return values indicate success and negative return values
377indicate failure.
378The meaning of a zero return value depends on the particular
379.Fa cmd
380and may indicate both success and failure, which is pathetic.
381.Pp
382Regardless of the
383.Fa cmd ,
384.Fn ENGINE_ctrl
385returns 0 if
386.Fa e
387is
388.Dv NULL
389or has a reference count of 0.
390This is quite unfortunate for commands like
391.Dv ENGINE_CTRL_GET_CMD_FLAGS
392where 0 may indicate success, so make sure
393.Fa e
394is valid before issuing a control command.
395.Pp
396For built-in commands except
397.Dv ENGINE_CTRL_HAS_CTRL_FUNCTION ,
398.Fn ENGINE_ctrl
399returns \-1 if
400.Dv ENGINE_FLAGS_MANUAL_CMD_CTRL
401is set but no
402.Fa ctrl_f
403has been installed with
404.Fn ENGINE_set_ctrl_function .
405.Pp
406For commands that are not built in,
407.Fn ENGINE_ctrl
408returns 0 if no
409.Fa ctrl_f
410has been installed with
411.Fn ENGINE_set_ctrl_function .
412.Pp
413.Fn ENGINE_cmd_is_executable
414returns 1 if the user-defined
415.Fa cmd
416is executable and has at least one of the flags
417.Dv ENGINE_CMD_FLAG_NUMERIC ,
418.Dv ENGINE_CMD_FLAG_STRING ,
419and
420.Dv ENGINE_CMD_FLAG_NO_INPUT
421set, or 0 otherwise.
422.Pp
423.Fn ENGINE_ctrl_cmd
424and
425.Fn ENGINE_ctrl_cmd_string
426return 1 on success or 0 on error.
427.Pp
428.Fn ENGINE_set_ctrl_function
429and
430.Fn ENGINE_set_cmd_defns
431always return 1.
432.Pp
433.Fn ENGINE_get_ctrl_function
434returns a pointer to the function
435.Fa ctrl_f
436installed with
437.Fn ENGINE_set_ctrl_function ,
438or
439.Dv NULL
440if none has been installed.
441.Pp
442.Fn ENGINE_get_cmd_defns
443returns the array of command definitions installed in
444.Fa e
445or
446.Dv NULL
447if none is installed.
448.Sh SEE ALSO
449.Xr ENGINE_add 3 ,
450.Xr ENGINE_init 3 ,
451.Xr ENGINE_new 3 ,
452.Xr ENGINE_register_RSA 3 ,
453.Xr ENGINE_set_flags 3 ,
454.Xr ENGINE_set_RSA 3
455.Sh HISTORY
456.Fn ENGINE_ctrl ,
457.Fn ENGINE_set_ctrl_function ,
458and
459.Fn ENGINE_get_ctrl_function
460first appeared in OpenSSL 0.9.7 and have been available since
461.Ox 2.9 .
462.Pp
463.Fn ENGINE_cmd_is_executable ,
464.Fn ENGINE_ctrl_cmd ,
465.Fn ENGINE_ctrl_cmd_string ,
466.Fn ENGINE_set_cmd_defns ,
467and
468.Fn ENGINE_get_cmd_defns
469first appeared in OpenSSL 0.9.7 and have been available since
470.Ox 3.2 .
diff --git a/src/lib/libcrypto/man/ENGINE_get_default_RSA.3 b/src/lib/libcrypto/man/ENGINE_get_default_RSA.3
deleted file mode 100644
index 348f13670f..0000000000
--- a/src/lib/libcrypto/man/ENGINE_get_default_RSA.3
+++ /dev/null
@@ -1,151 +0,0 @@
1.\" $OpenBSD: ENGINE_get_default_RSA.3,v 1.4 2023/07/21 04:35:36 tb Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: July 21 2023 $
20.Dt ENGINE_GET_DEFAULT_RSA 3
21.Os
22.Sh NAME
23.Nm ENGINE_get_default_RSA ,
24.Nm ENGINE_get_default_DSA ,
25.Nm ENGINE_get_default_EC ,
26.Nm ENGINE_get_default_DH ,
27.Nm ENGINE_get_default_RAND ,
28.Nm ENGINE_get_cipher_engine ,
29.Nm ENGINE_get_digest_engine ,
30.Nm ENGINE_set_table_flags ,
31.Nm ENGINE_get_table_flags
32.Nd retrieve the default ENGINE for an algorithm
33.Sh SYNOPSIS
34.In openssl/engine.h
35.Ft ENGINE *
36.Fn ENGINE_get_default_RSA void
37.Ft ENGINE *
38.Fn ENGINE_get_default_DSA void
39.Ft ENGINE *
40.Fn ENGINE_get_default_EC void
41.Ft ENGINE *
42.Fn ENGINE_get_default_DH void
43.Ft ENGINE *
44.Fn ENGINE_get_default_RAND void
45.Ft ENGINE *
46.Fo ENGINE_get_cipher_engine
47.Fa "int nid"
48.Fc
49.Ft ENGINE *
50.Fo ENGINE_get_digest_engine
51.Fa "int nid"
52.Fc
53.Ft void
54.Fo ENGINE_set_table_flags
55.Fa "unsigned int flags"
56.Fc
57.Ft unsigned int
58.Fn ENGINE_get_table_flags void
59.Sh DESCRIPTION
60These functions retrieve the current default
61.Vt ENGINE
62implementing the respective algorithm.
63.Pp
64If a default engine was previously selected,
65.Xr ENGINE_init 3
66is called on it again and it is used.
67Otherwise, these functions inspect the engines registered
68with the functions documented in
69.Xr ENGINE_register_RSA 3
70in the order of the table for the respective algorithm.
71If an inspected engine is already successfully initialized,
72.Xr ENGINE_init 3
73is called on it again and it is used as the new default.
74Otherwise, unless the global flag
75.Dv ENGINE_TABLE_FLAG_NOINIT
76is set,
77.Xr ENGINE_init 3
78is tried on it.
79If it succeeds, that engine is used as the new default.
80If it fails or if
81.Dv ENGINE_TABLE_FLAG_NOINIT
82is set, inspection continues with the next engine.
83.Pp
84The global flag can be set by calling
85.Fn ENGINE_set_table_flags
86with an argument of
87.Dv ENGINE_TABLE_FLAG_NOINIT
88or cleared by calling it with an argument of 0.
89By default, the flag is not set.
90.Pp
91While all the other functions operate on exactly one algorithm,
92.Fn ENGINE_get_cipher_engine
93and
94.Fn ENGINE_get_digest_engine
95are special in so far as they can handle multiple algorithms,
96identified by the given
97.Fa nid .
98The default engine is remembered separately for each algorithm.
99.Pp
100Application programs rarely need to call these functions because
101they are called automatically when needed, in particular from
102.Xr RSA_new 3 ,
103.Xr DSA_new 3 ,
104.Xr EC_KEY_new 3 ,
105.Xr DH_new 3 ,
106.Xr EVP_CipherInit_ex 3 ,
107and
108.Xr EVP_DigestInit_ex 3 .
109.Sh RETURN VALUES
110These functions return a functional reference to an
111.Vt ENGINE
112object or
113.Dv NULL
114on failure, in particular when no engine implementing the algorithm
115is available, when
116.Xr ENGINE_init 3
117fails for all implementations,
118or when insufficient memory is available.
119Even when these functions fail, the application may still be able
120to use the algorithm in question because the built-in implementation
121is used in that case, if one is available.
122.Pp
123.Fn ENGINE_get_table_flags
124returns
125.Dv ENGINE_TABLE_FLAG_NOINIT
126if the global flag is set or 0 otherwise.
127.Sh SEE ALSO
128.Xr ENGINE_init 3 ,
129.Xr ENGINE_new 3 ,
130.Xr ENGINE_register_RSA 3 ,
131.Xr ENGINE_set_default 3
132.Sh HISTORY
133.Fn ENGINE_get_default_RSA ,
134.Fn ENGINE_get_default_DSA ,
135.Fn ENGINE_get_default_DH ,
136and
137.Fn ENGINE_get_default_RAND
138first appeared in OpenSSL 0.9.7 and have been available since
139.Ox 2.9 .
140.Pp
141.Fn ENGINE_get_cipher_engine ,
142.Fn ENGINE_get_digest_engine ,
143.Fn ENGINE_set_table_flags ,
144and
145.Fn ENGINE_get_table_flags
146first appeared in OpenSSL 0.9.7 and have been available since
147.Ox 3.2 .
148.Pp
149.Fn ENGINE_get_default_EC
150first appeared in OpenSSL 1.1.0 and has been available since
151.Ox 6.5 .
diff --git a/src/lib/libcrypto/man/ENGINE_init.3 b/src/lib/libcrypto/man/ENGINE_init.3
deleted file mode 100644
index d41d98a2f1..0000000000
--- a/src/lib/libcrypto/man/ENGINE_init.3
+++ /dev/null
@@ -1,134 +0,0 @@
1.\" $OpenBSD: ENGINE_init.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $
2.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
3.\"
4.\" Permission to use, copy, modify, and distribute this software for any
5.\" purpose with or without fee is hereby granted, provided that the above
6.\" copyright notice and this permission notice appear in all copies.
7.\"
8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15.\"
16.Dd $Mdocdate: April 18 2018 $
17.Dt ENGINE_INIT 3
18.Os
19.Sh NAME
20.Nm ENGINE_init ,
21.Nm ENGINE_finish ,
22.Nm ENGINE_set_init_function ,
23.Nm ENGINE_set_finish_function ,
24.Nm ENGINE_get_init_function ,
25.Nm ENGINE_get_finish_function
26.Nd initialize ENGINE objects
27.Sh SYNOPSIS
28.In openssl/engine.h
29.Ft int
30.Fo ENGINE_init
31.Fa "ENGINE *e"
32.Fc
33.Ft int
34.Fo ENGINE_finish
35.Fa "ENGINE *e"
36.Fc
37.Ft typedef int
38.Fo (*ENGINE_GEN_INT_FUNC_PTR)
39.Fa "ENGINE *e"
40.Fc
41.Ft int
42.Fo ENGINE_set_init_function
43.Fa "ENGINE *e"
44.Fa "ENGINE_GEN_INT_FUNC_PTR init_f"
45.Fc
46.Ft int
47.Fo ENGINE_set_finish_function
48.Fa "ENGINE *e"
49.Fa "ENGINE_GEN_INT_FUNC_PTR finish_f"
50.Fc
51.Ft ENGINE_GEN_INT_FUNC_PTR
52.Fo ENGINE_get_init_function
53.Fa "const ENGINE *e"
54.Fc
55.Ft ENGINE_GEN_INT_FUNC_PTR
56.Fo ENGINE_get_finish_function
57.Fa "const ENGINE *e"
58.Fc
59.Sh DESCRIPTION
60.Fn ENGINE_init
61initializes
62.Fa e
63by calling the
64.Fa init_f
65previously installed with
66.Fn ENGINE_set_init_function ,
67if any.
68In case of success, it also increments both the structural
69and the functional reference count by 1.
70If no
71.Fa init_f
72was installed,
73.Fn ENGINE_init
74always succeeds.
75Calling
76.Fn ENGINE_init
77again after it already succeeded always succeeds, but has no effect
78except that it increments both the structural and the functional
79reference count by 1.
80.Pp
81.Fn ENGINE_finish
82decrements the functional reference count by 1.
83When it reaches 0, it calls the
84.Fa finish_f
85previously installed with
86.Fn ENGINE_set_finish_function ,
87if any.
88If no
89.Fa finish_f
90was installed,
91.Fn ENGINE_finish
92always succeeds.
93Unless
94.Fa finish_f
95fails,
96.Fn ENGINE_finish
97also calls
98.Xr ENGINE_free 3 .
99.Pp
100.Fn ENGINE_init
101is internally called by the functions documented in the
102.Xr ENGINE_get_default_RSA 3
103manual page.
104.Sh RETURN VALUES
105.Fn ENGINE_init
106and
107.Fn ENGINE_finish
108return 1 on success or 0 on error.
109.Pp
110.Fn ENGINE_set_init_function
111and
112.Fn ENGINE_set_finish_function
113always return 1.
114.Pp
115.Fn ENGINE_get_init_function
116and
117.Fn ENGINE_get_finish_function
118return a function pointer to the respective callback, or
119.Dv NULL
120if none is installed.
121.Sh SEE ALSO
122.Xr ENGINE_add 3 ,
123.Xr ENGINE_ctrl 3 ,
124.Xr ENGINE_get_default_RSA 3 ,
125.Xr ENGINE_new 3 ,
126.Xr ENGINE_register_RSA 3 ,
127.Xr ENGINE_set_default 3 ,
128.Xr ENGINE_set_flags 3 ,
129.Xr ENGINE_set_RSA 3 ,
130.Xr ENGINE_unregister_RSA 3
131.Sh HISTORY
132These functions first appeared in OpenSSL 0.9.7
133and have been available since
134.Ox 2.9 .
diff --git a/src/lib/libcrypto/man/ENGINE_register_RSA.3 b/src/lib/libcrypto/man/ENGINE_register_RSA.3
deleted file mode 100644
index 5c63729cfc..0000000000
--- a/src/lib/libcrypto/man/ENGINE_register_RSA.3
+++ /dev/null
@@ -1,142 +0,0 @@
1.\" $OpenBSD: ENGINE_register_RSA.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: April 18 2018 $
20.Dt ENGINE_REGISTER_RSA 3
21.Os
22.Sh NAME
23.Nm ENGINE_register_RSA ,
24.Nm ENGINE_register_DSA ,
25.Nm ENGINE_register_ECDH ,
26.Nm ENGINE_register_ECDSA ,
27.Nm ENGINE_register_DH ,
28.Nm ENGINE_register_RAND ,
29.Nm ENGINE_register_STORE ,
30.Nm ENGINE_register_ciphers ,
31.Nm ENGINE_register_digests ,
32.Nm ENGINE_register_complete
33.Nd register an ENGINE as implementing an algorithm
34.Sh SYNOPSIS
35.In openssl/engine.h
36.Ft int
37.Fo ENGINE_register_RSA
38.Fa "ENGINE *e"
39.Fc
40.Ft int
41.Fo ENGINE_register_DSA
42.Fa "ENGINE *e"
43.Fc
44.Ft int
45.Fo ENGINE_register_ECDH
46.Fa "ENGINE *e"
47.Fc
48.Ft int
49.Fo ENGINE_register_ECDSA
50.Fa "ENGINE *e"
51.Fc
52.Ft int
53.Fo ENGINE_register_DH
54.Fa "ENGINE *e"
55.Fc
56.Ft int
57.Fo ENGINE_register_RAND
58.Fa "ENGINE *e"
59.Fc
60.Ft int
61.Fo ENGINE_register_STORE
62.Fa "ENGINE *e"
63.Fc
64.Ft int
65.Fo ENGINE_register_ciphers
66.Fa "ENGINE *e"
67.Fc
68.Ft int
69.Fo ENGINE_register_digests
70.Fa "ENGINE *e"
71.Fc
72.Ft int
73.Fo ENGINE_register_complete
74.Fa "ENGINE *e"
75.Fc
76.Sh DESCRIPTION
77In addition to the global table described in
78.Xr ENGINE_add 3 ,
79the crypto library maintains several tables containing references to
80.Vt ENGINE
81objects implementing one specific cryptographic algorithm.
82.Pp
83The functions listed in the present manual page append
84.Fa e
85to the end of the table for the respective algorithm.
86.Pp
87If
88.Fa e
89does not contain a method for the requested algorithm,
90these functions succeed without having any effect.
91.Pp
92If
93.Fa e
94is already registered for the given algorithm,
95they move it to the end of the respective table.
96.Pp
97.Fn ENGINE_register_ciphers
98and
99.Fn ENGINE_register_digests
100are special in so far as an engine may implement
101more than one cipher or more than one digest.
102In that case,
103.Fa e
104is registered for all the ciphers or digests it implements.
105.Pp
106.Fn ENGINE_register_complete
107registers
108.Fa e
109for all algorithms it implements by calling all the other functions.
110.Sh RETURN VALUES
111These functions return 1 on success or 0 on error.
112They only fail if insufficient memory is available.
113.Sh SEE ALSO
114.Xr ENGINE_add 3 ,
115.Xr ENGINE_get_default_RSA 3 ,
116.Xr ENGINE_init 3 ,
117.Xr ENGINE_new 3 ,
118.Xr ENGINE_register_all_RSA 3 ,
119.Xr ENGINE_set_default 3 ,
120.Xr ENGINE_set_RSA 3 ,
121.Xr ENGINE_unregister_RSA 3
122.Sh HISTORY
123.Fn ENGINE_register_RSA ,
124.Fn ENGINE_register_DSA ,
125.Fn ENGINE_register_DH ,
126.Fn ENGINE_register_RAND ,
127.Fn ENGINE_register_ciphers ,
128.Fn ENGINE_register_digests ,
129and
130.Fn ENGINE_register_complete
131first appeared in OpenSSL 0.9.7 and have been available since
132.Ox 3.2 .
133.Pp
134.Fn ENGINE_register_ECDH ,
135.Fn ENGINE_register_ECDSA ,
136and
137.Fn ENGINE_register_STORE
138first appeared in OpenSSL 0.9.8 and have been available since
139.Ox 4.5 .
140.Sh BUGS
141.Fn ENGINE_register_complete
142ignores all errors, even memory allocation failure, and always returns 1.
diff --git a/src/lib/libcrypto/man/ENGINE_register_all_RSA.3 b/src/lib/libcrypto/man/ENGINE_register_all_RSA.3
deleted file mode 100644
index 3016eec3d4..0000000000
--- a/src/lib/libcrypto/man/ENGINE_register_all_RSA.3
+++ /dev/null
@@ -1,123 +0,0 @@
1.\" $OpenBSD: ENGINE_register_all_RSA.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: April 18 2018 $
20.Dt ENGINE_REGISTER_ALL_RSA 3
21.Os
22.Sh NAME
23.Nm ENGINE_register_all_RSA ,
24.Nm ENGINE_register_all_DSA ,
25.Nm ENGINE_register_all_ECDH ,
26.Nm ENGINE_register_all_ECDSA ,
27.Nm ENGINE_register_all_DH ,
28.Nm ENGINE_register_all_RAND ,
29.Nm ENGINE_register_all_STORE ,
30.Nm ENGINE_register_all_ciphers ,
31.Nm ENGINE_register_all_digests ,
32.Nm ENGINE_register_all_complete ,
33.Nm ENGINE_load_builtin_engines ,
34.Nm ENGINE_load_dynamic
35.Nd register all engines as implementing an algorithm
36.Sh SYNOPSIS
37.In openssl/engine.h
38.Ft void
39.Fn ENGINE_register_all_RSA void
40.Ft void
41.Fn ENGINE_register_all_DSA void
42.Ft void
43.Fn ENGINE_register_all_ECDH void
44.Ft void
45.Fn ENGINE_register_all_ECDSA void
46.Ft void
47.Fn ENGINE_register_all_DH void
48.Ft void
49.Fn ENGINE_register_all_RAND void
50.Ft void
51.Fn ENGINE_register_all_STORE void
52.Ft void
53.Fn ENGINE_register_all_ciphers void
54.Ft void
55.Fn ENGINE_register_all_digests void
56.Ft int
57.Fn ENGINE_register_all_complete void
58.Ft void
59.Fn ENGINE_load_builtin_engines void
60.Ft void
61.Fn ENGINE_load_dynamic void
62.Sh DESCRIPTION
63These functions loop over all the
64.Vt ENGINE
65objects contained in the global table described in the
66.Xr ENGINE_add 3
67manual page.
68They register each object for the respective algorithm
69by calling the corresponding function described in
70.Xr ENGINE_register_RSA 3 .
71.Pp
72.Fn ENGINE_register_all_complete
73calls
74.Fn ENGINE_register_complete
75in this way, except that it skips those
76.Vt ENGINE
77objects that have the
78.Dv ENGINE_FLAGS_NO_REGISTER_ALL
79flag set with
80.Xr ENGINE_set_flags 3 .
81.Pp
82.Fn ENGINE_load_builtin_engines
83calls
84.Xr OPENSSL_init_crypto 3
85with no options, loads any built-in engines
86that are enabled by default, and calls
87.Fn ENGINE_register_all_complete .
88Currently, LibreSSL does not provide any engines.
89.Sy GOST
90and
91.Sy aesni
92support is provided by the crypto library itself
93and does not require any engines, not even built-in ones.
94.Pp
95.Fn ENGINE_load_dynamic
96has no effect and is only provided for compatibility.
97.Sh SEE ALSO
98.Xr ENGINE_add 3 ,
99.Xr ENGINE_new 3 ,
100.Xr ENGINE_register_RSA 3 ,
101.Xr ENGINE_set_flags 3 ,
102.Xr OPENSSL_config 3 ,
103.Xr OPENSSL_init_crypto 3
104.Sh HISTORY
105.Fn ENGINE_register_all_RSA ,
106.Fn ENGINE_register_all_DSA ,
107.Fn ENGINE_register_all_DH ,
108.Fn ENGINE_register_all_RAND ,
109.Fn ENGINE_register_all_ciphers ,
110.Fn ENGINE_register_all_digests ,
111.Fn ENGINE_register_all_complete ,
112.Fn ENGINE_load_builtin_engines ,
113and
114.Fn ENGINE_load_dynamic
115first appeared in OpenSSL 0.9.7 and have been available since
116.Ox 3.2 .
117.Pp
118.Fn ENGINE_register_all_ECDH ,
119.Fn ENGINE_register_all_ECDSA ,
120and
121.Fn ENGINE_register_all_STORE
122first appeared in OpenSSL 0.9.8 and have been available since
123.Ox 4.5 .
diff --git a/src/lib/libcrypto/man/ENGINE_set_RSA.3 b/src/lib/libcrypto/man/ENGINE_set_RSA.3
deleted file mode 100644
index b2cec473bd..0000000000
--- a/src/lib/libcrypto/man/ENGINE_set_RSA.3
+++ /dev/null
@@ -1,317 +0,0 @@
1.\" $OpenBSD: ENGINE_set_RSA.3,v 1.7 2023/07/21 04:29:27 tb Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: July 21 2023 $
20.Dt ENGINE_SET_RSA 3
21.Os
22.Sh NAME
23.Nm ENGINE_set_RSA ,
24.Nm ENGINE_get_RSA ,
25.Nm ENGINE_set_DSA ,
26.Nm ENGINE_get_DSA ,
27.Nm ENGINE_set_EC ,
28.Nm ENGINE_get_EC ,
29.Nm ENGINE_set_DH ,
30.Nm ENGINE_get_DH ,
31.Nm ENGINE_set_RAND ,
32.Nm ENGINE_get_RAND ,
33.Nm ENGINE_set_STORE ,
34.Nm ENGINE_get_STORE ,
35.Nm ENGINE_set_ciphers ,
36.Nm ENGINE_get_ciphers ,
37.Nm ENGINE_get_cipher ,
38.Nm ENGINE_set_digests ,
39.Nm ENGINE_get_digests ,
40.Nm ENGINE_get_digest
41.Nd install and retrieve function tables of crypto engines
42.Sh SYNOPSIS
43.In openssl/engine.h
44.Ft int
45.Fo ENGINE_set_RSA
46.Fa "ENGINE *e"
47.Fa "const RSA_METHOD *rsa_meth"
48.Fc
49.Ft const RSA_METHOD *
50.Fo ENGINE_get_RSA
51.Fa "const ENGINE *e"
52.Fc
53.Ft int
54.Fo ENGINE_set_DSA
55.Fa "ENGINE *e"
56.Fa "const DSA_METHOD *dsa_meth"
57.Fc
58.Ft const DSA_METHOD *
59.Fo ENGINE_get_DSA
60.Fa "const ENGINE *e"
61.Fc
62.Ft int
63.Fo ENGINE_set_EC
64.Fa "ENGINE *e"
65.Fa "const EC_KEY_METHOD *ec_meth"
66.Fc
67.Ft const EC_KEY_METHOD *
68.Fo ENGINE_get_EC
69.Fa "const ENGINE *e"
70.Fc
71.Ft int
72.Fo ENGINE_set_DH
73.Fa "ENGINE *e"
74.Fa "const DH_METHOD *dh_meth"
75.Fc
76.Ft const DH_METHOD *
77.Fo ENGINE_get_DH
78.Fa "const ENGINE *e"
79.Fc
80.Ft int
81.Fo ENGINE_set_RAND
82.Fa "ENGINE *e"
83.Fa "const RAND_METHOD *rand_meth"
84.Fc
85.Ft const RAND_METHOD *
86.Fo ENGINE_get_RAND
87.Fa "const ENGINE *e"
88.Fc
89.Ft int
90.Fo ENGINE_set_STORE
91.Fa "ENGINE *e"
92.Fa "const STORE_METHOD *rand_meth"
93.Fc
94.Ft const STORE_METHOD *
95.Fo ENGINE_get_STORE
96.Fa "const ENGINE *e"
97.Fc
98.Ft typedef int
99.Fo (*ENGINE_CIPHERS_PTR)
100.Fa "ENGINE *e"
101.Fa "const EVP_CIPHER **impl"
102.Fa "const int **nids"
103.Fa "int nid"
104.Fc
105.Ft int
106.Fo ENGINE_set_ciphers
107.Fa "ENGINE *e"
108.Fa "ENGINE_CIPHERS_PTR f"
109.Fc
110.Ft ENGINE_CIPHERS_PTR
111.Fo ENGINE_get_ciphers
112.Fa "const ENGINE *e"
113.Fc
114.Ft const EVP_CIPHER *
115.Fo ENGINE_get_cipher
116.Fa "ENGINE *e"
117.Fa "int nid"
118.Fc
119.Ft typedef int
120.Fo (*ENGINE_DIGESTS_PTR)
121.Fa "ENGINE *e"
122.Fa "const EVP_MD **impl"
123.Fa "const int **nids"
124.Fa "int nid"
125.Fc
126.Ft int
127.Fo ENGINE_set_digests
128.Fa "ENGINE *e"
129.Fa "ENGINE_DIGESTS_PTR f"
130.Fc
131.Ft ENGINE_DIGESTS_PTR
132.Fo ENGINE_get_digests
133.Fa "const ENGINE *e"
134.Fc
135.Ft const EVP_MD *
136.Fo ENGINE_get_digest
137.Fa "ENGINE *e"
138.Fa "int nid"
139.Fc
140.Sh DESCRIPTION
141The
142.Fn ENGINE_set_*
143functions install a table of function pointers
144implementing the respective algorithm in
145.Fa e .
146Partial information about the various method objects is available from
147.Xr RSA_meth_new 3 ,
148.Xr RSA_get_default_method 3 ,
149.Xr DSA_meth_new 3 ,
150.Xr DSA_get_default_method 3 ,
151.Xr EC_KEY_get_default_method 3 ,
152.Xr DH_get_default_method 3 ,
153.Xr RAND_get_rand_method 3 ,
154.Xr EVP_get_cipherbynid 3 ,
155and
156.Xr EVP_get_digestbynid 3 .
157.Vt STORE_METHOD
158is an incomplete type, and the pointers to it are not used for anything.
159For complete descriptions of these types,
160refer to the respective header files.
161.Pp
162The functions described in the
163.Xr ENGINE_register_RSA 3
164and
165.Xr ENGINE_set_default 3
166manual pages only have an effect after function pointers
167were installed using the functions described here.
168.Pp
169.Fn ENGINE_set_ciphers
170and
171.Fn ENGINE_set_digests
172are special in so far as the
173.Vt ENGINE
174structure does not provide fields to store function pointers
175implementing ciphers or digests.
176Instead, these two functions only install a callback to
177retrieve implementations.
178Where the pointers to the implementations are stored internally,
179how they get initialized, and how the
180.Vt ENGINE_CIPHERS_PTR
181and
182.Vt ENGINE_DIGESTS_PTR
183callbacks retrieve them
184is up to the implementation of each individual engine.
185.Pp
186If the
187.Vt ENGINE_CIPHERS_PTR
188and
189.Vt ENGINE_DIGESTS_PTR
190callbacks are called with a non-zero
191.Fa nid ,
192they retrieve the implementation of that cipher or digest,
193respectively.
194In this case, a
195.Dv NULL
196pointer can be passed as the
197.Fa nids
198argument.
199.Fn ENGINE_get_cipher
200and
201.Fn ENGINE_get_digest
202call the callbacks installed in
203.Fa e
204in this way.
205.Pp
206If 0 is passed as the
207.Fa nid
208argument, an internal pointer
209to the array of implementations available in
210.Fa e
211is returned in
212.Pf * Fa impl ,
213and an internal pointer
214to the array of corresponding identifiers in
215.Pf * Fa nids .
216The return value of the callback indicates
217the number of implementations returned.
218.Pp
219The
220.Fn ENGINE_get_*
221functions retrieve the previously installed function tables.
222They are used when constructing basic cryptographic objects
223as shown in the following table:
224.Bl -column "ENGINE_get_digestMM"
225.It Accessor: Ta Called by:
226.It Fn ENGINE_get_RSA Ta Xr RSA_new_method 3 , Xr RSA_new 3
227.It Fn ENGINE_get_DSA Ta Xr DSA_new_method 3 , Xr DSA_new 3
228.It Fn ENGINE_get_EC Ta Xr EC_KEY_new_method 3 , Xr EC_KEY_new 3 ,
229.Xr EC_KEY_new_by_curve_name 3
230.It Fn ENGINE_get_DH Ta Xr DH_new_method 3 , Xr DH_new 3
231.It Fn ENGINE_get_RAND Ta unused
232.It Fn ENGINE_get_STORE Ta unused
233.It Fn ENGINE_get_cipher Ta Xr EVP_CipherInit_ex 3
234.It Fn ENGINE_get_digest Ta Xr EVP_DigestInit_ex 3
235.El
236.Sh RETURN VALUES
237The
238.Fn ENGINE_set_*
239functions return 1 on success or 0 on error.
240Currently, they cannot fail.
241.Pp
242The
243.Fn ENGINE_get_*
244functions return a method object for the respective algorithm, or
245.Dv NULL
246if none is installed.
247.Pp
248.Fn ENGINE_get_ciphers
249and
250.Fn ENGINE_get_digests
251return a function pointer to the respective callback, or
252.Dv NULL
253if none is installed.
254.Pp
255.Fn ENGINE_get_cipher
256returns an
257.Vt EVP_CIPHER
258object implementing the cipher
259.Fa nid
260or
261.Dv NULL
262if
263.Fa e
264does not implement that cipher.
265.Pp
266.Fn ENGINE_get_digest
267returns an
268.Vt EVP_MD
269object implementing the digest
270.Fa nid
271or
272.Dv NULL
273if
274.Fa e
275does not implement that digest.
276.Sh SEE ALSO
277.Xr DSA_new 3 ,
278.Xr ENGINE_ctrl 3 ,
279.Xr ENGINE_new 3 ,
280.Xr ENGINE_register_RSA 3 ,
281.Xr ENGINE_set_default 3 ,
282.Xr ENGINE_set_flags 3 ,
283.Xr EVP_DigestInit 3 ,
284.Xr EVP_EncryptInit 3 ,
285.Xr RSA_new 3
286.Sh HISTORY
287.Fn ENGINE_set_RSA ,
288.Fn ENGINE_get_RSA ,
289.Fn ENGINE_set_DSA ,
290.Fn ENGINE_get_DSA ,
291.Fn ENGINE_set_DH ,
292.Fn ENGINE_get_DH ,
293.Fn ENGINE_set_RAND ,
294.Fn ENGINE_get_RAND ,
295first appeared in OpenSSL 0.9.7 and have been available since
296.Ox 2.9 .
297.Pp
298.Fn ENGINE_set_ciphers ,
299.Fn ENGINE_get_ciphers ,
300.Fn ENGINE_get_cipher ,
301.Fn ENGINE_set_digests ,
302.Fn ENGINE_get_digests ,
303and
304.Fn ENGINE_get_digest
305first appeared in OpenSSL 0.9.7 and have been available since
306.Ox 3.2 .
307.Pp
308.Fn ENGINE_set_STORE
309and
310.Fn ENGINE_get_STORE
311first appeared in OpenSSL 0.9.8 and have been available since
312.Ox 4.5 .
313.Fn ENGINE_set_EC
314and
315.Fn ENGINE_get_EC
316first appeared in OpenSSL 1.1.0 and have been available since
317.Ox 6.5 .
diff --git a/src/lib/libcrypto/man/ENGINE_set_default.3 b/src/lib/libcrypto/man/ENGINE_set_default.3
deleted file mode 100644
index c2655f2b9b..0000000000
--- a/src/lib/libcrypto/man/ENGINE_set_default.3
+++ /dev/null
@@ -1,186 +0,0 @@
1.\" $OpenBSD: ENGINE_set_default.3,v 1.4 2019/06/03 14:43:15 schwarze Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: June 3 2019 $
20.Dt ENGINE 3
21.Os
22.Sh NAME
23.Nm ENGINE_set_default ,
24.Nm ENGINE_set_default_string ,
25.Nm ENGINE_set_default_RSA ,
26.Nm ENGINE_set_default_DSA ,
27.Nm ENGINE_set_default_ECDH ,
28.Nm ENGINE_set_default_ECDSA ,
29.Nm ENGINE_set_default_DH ,
30.Nm ENGINE_set_default_RAND ,
31.Nm ENGINE_set_default_ciphers ,
32.Nm ENGINE_set_default_digests
33.Nd register an ENGINE as the default for an algorithm
34.Sh SYNOPSIS
35.In openssl/engine.h
36.Ft int
37.Fo ENGINE_set_default_RSA
38.Fa "ENGINE *e"
39.Fc
40.Ft int
41.Fo ENGINE_set_default_DSA
42.Fa "ENGINE *e"
43.Fc
44.Ft int
45.Fo ENGINE_set_default_ECDH
46.Fa "ENGINE *e"
47.Fc
48.Ft int
49.Fo ENGINE_set_default_ECDSA
50.Fa "ENGINE *e"
51.Fc
52.Ft int
53.Fo ENGINE_set_default_DH
54.Fa "ENGINE *e"
55.Fc
56.Ft int
57.Fo ENGINE_set_default_RAND
58.Fa "ENGINE *e"
59.Fc
60.Ft int
61.Fo ENGINE_set_default_ciphers
62.Fa "ENGINE *e"
63.Fc
64.Ft int
65.Fo ENGINE_set_default_digests
66.Fa "ENGINE *e"
67.Fc
68.Ft int
69.Fo ENGINE_set_default
70.Fa "ENGINE *e"
71.Fa "unsigned int flags"
72.Fc
73.Ft int
74.Fo ENGINE_set_default_string
75.Fa "ENGINE *e"
76.Fa "const char *list"
77.Fc
78.Sh DESCRIPTION
79These functions register
80.Fa e
81as implementing the respective algorithm
82like the functions described in the
83.Xr ENGINE_register_RSA 3
84manual page do it.
85In addition, they call
86.Xr ENGINE_init 3
87on
88.Fa e
89and select
90.Fa e
91as the default implementation of the respective algorithm to be
92returned by the functions described in
93.Xr ENGINE_get_default_RSA 3
94in the future.
95If another engine was previously selected
96as the default implementation of the respective algorithm,
97.Xr ENGINE_finish 3
98is called on that previous engine.
99.Pp
100If
101.Fa e
102implements more than one cipher or digest,
103.Fn ENGINE_set_default_ciphers
104and
105.Fn ENGINE_set_default_digests
106register and select it for all these ciphers and digests, respectively.
107.Pp
108.Fn ENGINE_set_default
109registers
110.Fa e
111as the default implementation of all algorithms specified by the
112.Fa flags
113by calling the appropriate ones among the other functions.
114Algorithms can be selected by combining any number of the
115following constants with bitwise OR:
116.Dv ENGINE_METHOD_ALL ,
117.Dv ENGINE_METHOD_RSA ,
118.Dv ENGINE_METHOD_DSA ,
119.Dv ENGINE_METHOD_ECDH ,
120.Dv ENGINE_METHOD_ECDSA ,
121.Dv ENGINE_METHOD_DH ,
122.Dv ENGINE_METHOD_RAND ,
123.Dv ENGINE_METHOD_CIPHERS ,
124.Dv ENGINE_METHOD_DIGESTS ,
125.Dv ENGINE_METHOD_PKEY_METHS ,
126and
127.Dv ENGINE_METHOD_PKEY_ASN1_METHS .
128.Pp
129.Fn ENGINE_set_default_string
130is similar except that it selects the algorithms according to the string
131.Fa def_list ,
132which contains an arbitrary number of comma-separated keywords from
133the following list: ALL, RSA, DSA, ECDH, ECDSA, DH, RAND, CIPHERS,
134DIGESTS, PKEY_CRYPTO, PKEY_ASN1, and PKEY.
135PKEY_CRYPTO corresponds to
136.Dv ENGINE_METHOD_PKEY_METHS ,
137PKEY_ASN1 to
138.Dv ENGINE_METHOD_PKEY_ASN1_METHS ,
139and PKEY selects both.
140.Sh RETURN VALUES
141These functions return 1 on success or 0 on error.
142They fail if
143.Xr ENGINE_init 3
144fails or if insufficient memory is available.
145.Sh SEE ALSO
146.Xr ENGINE_get_default_RSA 3 ,
147.Xr ENGINE_init 3 ,
148.Xr ENGINE_new 3 ,
149.Xr ENGINE_register_RSA 3 ,
150.Xr ENGINE_set_RSA 3 ,
151.Xr ENGINE_unregister_RSA 3
152.Sh HISTORY
153.Fn ENGINE_set_default ,
154.Fn ENGINE_set_default_RSA ,
155.Fn ENGINE_set_default_DSA ,
156.Fn ENGINE_set_default_DH ,
157and
158.Fn ENGINE_set_default_RAND
159first appeared in OpenSSL 0.9.7 and have been available since
160.Ox 2.9 .
161.Pp
162.Fn ENGINE_set_default_string ,
163.Fn ENGINE_set_default_ciphers ,
164and
165.Fn ENGINE_set_default_digests
166first appeared in OpenSSL 0.9.7 and have been available since
167.Ox 3.2 .
168.Pp
169.Fn ENGINE_set_default_ECDH
170and
171.Fn ENGINE_set_default_ECDSA
172first appeared in OpenSSL 0.9.8 and have been available since
173.Ox 4.5 .
174.Sh CAVEATS
175Failure of
176.Xr ENGINE_finish 3
177is ignored.
178.Sh BUGS
179Even when
180.Fn ENGINE_set_default
181or
182.Fn ENGINE_set_default_string
183fail, they typically still register
184.Fa e
185for some algorithms, but usually not for all it could be registered
186for by calling the individual functions.
diff --git a/src/lib/libcrypto/man/ENGINE_set_flags.3 b/src/lib/libcrypto/man/ENGINE_set_flags.3
deleted file mode 100644
index 33e8f333ce..0000000000
--- a/src/lib/libcrypto/man/ENGINE_set_flags.3
+++ /dev/null
@@ -1,92 +0,0 @@
1.\" $OpenBSD: ENGINE_set_flags.3,v 1.2 2018/04/18 03:39:22 schwarze Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: April 18 2018 $
20.Dt ENGINE_SET_FLAGS 3
21.Os
22.Sh NAME
23.Nm ENGINE_set_flags ,
24.Nm ENGINE_get_flags
25.Nd modify the behaviour of an ENGINE object
26.Sh SYNOPSIS
27.In openssl/engine.h
28.Ft int
29.Fo ENGINE_set_flags
30.Fa "ENGINE *e"
31.Fa "int flags"
32.Fc
33.Ft int
34.Fo ENGINE_get_flags
35.Fa "const ENGINE *e"
36.Fc
37.Sh DESCRIPTION
38.Fn ENGINE_set_flags
39sets the flags attribute of
40.Fa e
41to the new
42.Fa flags .
43The previous state of the flags attribute is overwritten.
44Flags that were previously set are cleared
45unless they are also present in the new
46.Fa flags .
47.Pp
48The
49.Fa flags
50argument can be the bitwise OR of zero or more
51of the following constants:
52.Bl -tag -width Ds
53.It Dv ENGINE_FLAGS_BY_ID_COPY
54.Xr ENGINE_by_id 3
55returns a shallow copy of the
56.Vt ENGINE
57object it found rather than incrementing the reference count
58and returning a pointer to the original.
59.It Dv ENGINE_FLAGS_MANUAL_CMD_CTRL
60.Xr ENGINE_ctrl 3
61lets the function installed with
62.Xr ENGINE_set_ctrl_function 3
63handle all commands except
64.Dv ENGINE_CTRL_HAS_CTRL_FUNCTION ,
65even the builtin commands.
66.It Dv ENGINE_FLAGS_NO_REGISTER_ALL
67.Xr ENGINE_register_all_complete 3
68skips
69.Fa e .
70.El
71.Sh RETURN VALUES
72.Fn ENGINE_set_flags
73always returns 1.
74.Pp
75.Fn ENGINE_get_flags
76returns the
77.Fa flags
78attribute of
79.Fa e .
80.Sh SEE ALSO
81.Xr ENGINE_by_id 3 ,
82.Xr ENGINE_ctrl 3 ,
83.Xr ENGINE_init 3 ,
84.Xr ENGINE_new 3 ,
85.Xr ENGINE_register_all_complete 3 ,
86.Xr ENGINE_set_RSA 3
87.Sh HISTORY
88.Fn ENGINE_set_flags
89and
90.Fn ENGINE_get_flags
91first appeared in OpenSSL 0.9.7 and have been available since
92.Ox 3.2 .
diff --git a/src/lib/libcrypto/man/ENGINE_unregister_RSA.3 b/src/lib/libcrypto/man/ENGINE_unregister_RSA.3
deleted file mode 100644
index d037306382..0000000000
--- a/src/lib/libcrypto/man/ENGINE_unregister_RSA.3
+++ /dev/null
@@ -1,119 +0,0 @@
1.\" $OpenBSD: ENGINE_unregister_RSA.3,v 1.3 2018/04/18 03:39:22 schwarze Exp $
2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\"
5.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: April 18 2018 $
20.Dt ENGINE_UNREGISTER_RSA 3
21.Os
22.Sh NAME
23.Nm ENGINE_unregister_RSA ,
24.Nm ENGINE_unregister_DSA ,
25.Nm ENGINE_unregister_ECDH ,
26.Nm ENGINE_unregister_ECDSA ,
27.Nm ENGINE_unregister_DH ,
28.Nm ENGINE_unregister_RAND ,
29.Nm ENGINE_unregister_STORE ,
30.Nm ENGINE_unregister_ciphers ,
31.Nm ENGINE_unregister_digests
32.Nd revoke the registration of an ENGINE object
33.Sh SYNOPSIS
34.In openssl/engine.h
35.Ft void
36.Fo ENGINE_unregister_RSA
37.Fa "ENGINE *e"
38.Fc
39.Ft void
40.Fo ENGINE_unregister_DSA
41.Fa "ENGINE *e"
42.Fc
43.Ft void
44.Fo ENGINE_unregister_ECDH
45.Fa "ENGINE *e"
46.Fc
47.Ft void
48.Fo ENGINE_unregister_ECDSA
49.Fa "ENGINE *e"
50.Fc
51.Ft void
52.Fo ENGINE_unregister_DH
53.Fa "ENGINE *e"
54.Fc
55.Ft void
56.Fo ENGINE_unregister_RAND
57.Fa "ENGINE *e"
58.Fc
59.Ft void
60.Fo ENGINE_unregister_STORE
61.Fa "ENGINE *e"
62.Fc
63.Ft void
64.Fo ENGINE_unregister_ciphers
65.Fa "ENGINE *e"
66.Fc
67.Ft void
68.Fo ENGINE_unregister_digests
69.Fa "ENGINE *e"
70.Fc
71.Sh DESCRIPTION
72These functions remove
73.Fa e
74from the list of
75.Vt ENGINE
76objects that were previously registered for the respective algorithm
77with the functions described in
78.Xr ENGINE_register_RSA 3 .
79.Pp
80If
81.Fa e
82is currently used as the default engine for the algorithm
83as described in the
84.Fn ENGINE_set_default 3
85and
86.Fn ENGINE_get_default_RSA 3
87manual pages,
88.Xr ENGINE_finish 3
89is also called.
90.Pp
91.Fn ENGINE_unregister_ciphers
92and
93.Fn ENGINE_unregister_digests
94unregister
95.Fa e
96for all ciphers or digests, respectively.
97.Sh SEE ALSO
98.Xr ENGINE_cleanup 3 ,
99.Xr ENGINE_finish 3 ,
100.Xr ENGINE_new 3 ,
101.Xr ENGINE_register_RSA 3 ,
102.Xr ENGINE_set_default 3
103.Sh HISTORY
104.Fn ENGINE_unregister_RSA ,
105.Fn ENGINE_unregister_DSA ,
106.Fn ENGINE_unregister_DH ,
107.Fn ENGINE_unregister_RAND ,
108.Fn ENGINE_unregister_ciphers ,
109and
110.Fn ENGINE_unregister_digests
111first appeared in OpenSSL 0.9.7 and have been available since
112.Ox 3.2 .
113.Pp
114.Fn ENGINE_unregister_ECDH ,
115.Fn ENGINE_unregister_ECDSA ,
116and
117.Fn ENGINE_unregister_STORE
118first appeared in OpenSSL 0.9.8 and have been available since
119.Ox 4.5 .
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index f42e9327ae..01be881165 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.276 2023/09/29 08:57:49 tb Exp $ 1# $OpenBSD: Makefile,v 1.277 2023/11/19 10:36:14 tb Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -140,17 +140,7 @@ MAN= \
140 EC_KEY_new.3 \ 140 EC_KEY_new.3 \
141 EC_POINT_add.3 \ 141 EC_POINT_add.3 \
142 EC_POINT_new.3 \ 142 EC_POINT_new.3 \
143 ENGINE_add.3 \
144 ENGINE_ctrl.3 \
145 ENGINE_get_default_RSA.3 \
146 ENGINE_init.3 \
147 ENGINE_new.3 \ 143 ENGINE_new.3 \
148 ENGINE_register_RSA.3 \
149 ENGINE_register_all_RSA.3 \
150 ENGINE_set_RSA.3 \
151 ENGINE_set_default.3 \
152 ENGINE_set_flags.3 \
153 ENGINE_unregister_RSA.3 \
154 ERR.3 \ 144 ERR.3 \
155 ERR_GET_LIB.3 \ 145 ERR_GET_LIB.3 \
156 ERR_asprintf_error_data.3 \ 146 ERR_asprintf_error_data.3 \