summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ENGINE_add.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/ENGINE_add.3')
-rw-r--r--src/lib/libcrypto/man/ENGINE_add.384
1 files changed, 78 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/ENGINE_add.3 b/src/lib/libcrypto/man/ENGINE_add.3
index faecb8a2ab..c54fa5cf05 100644
--- a/src/lib/libcrypto/man/ENGINE_add.3
+++ b/src/lib/libcrypto/man/ENGINE_add.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ENGINE_add.3,v 1.1 2018/04/15 01:43:45 schwarze Exp $ 1.\" $OpenBSD: ENGINE_add.3,v 1.2 2018/04/15 17:02:03 schwarze Exp $
2.\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800 2.\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800
3.\" 3.\"
4.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> 4.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -20,7 +20,12 @@
20.Os 20.Os
21.Sh NAME 21.Sh NAME
22.Nm ENGINE_add , 22.Nm ENGINE_add ,
23.Nm ENGINE_set_id ,
24.Nm ENGINE_get_id ,
25.Nm ENGINE_set_name ,
26.Nm ENGINE_get_name ,
23.Nm ENGINE_remove , 27.Nm ENGINE_remove ,
28.Nm ENGINE_cleanup ,
24.Nm ENGINE_get_first , 29.Nm ENGINE_get_first ,
25.Nm ENGINE_get_last , 30.Nm ENGINE_get_last ,
26.Nm ENGINE_get_next , 31.Nm ENGINE_get_next ,
@@ -34,9 +39,29 @@
34.Fa "ENGINE *e" 39.Fa "ENGINE *e"
35.Fc 40.Fc
36.Ft int 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
37.Fo ENGINE_remove 60.Fo ENGINE_remove
38.Fa "ENGINE *e" 61.Fa "ENGINE *e"
39.Fc 62.Fc
63.Ft void
64.Fn ENGINE_cleanup void
40.Ft ENGINE * 65.Ft ENGINE *
41.Fn ENGINE_get_first void 66.Fn ENGINE_get_first void
42.Ft ENGINE * 67.Ft ENGINE *
@@ -63,12 +88,12 @@ appends
63.Fa e 88.Fa e
64to the end of the list 89to the end of the list
65and increments its structural reference count by 1. 90and increments its structural reference count by 1.
66The name and identifier of 91A unique identifier and a name of
67.Fa e 92.Fa e
68have to be set with 93have to be set with
69.Xr ENGINE_set_name 3 94.Fn ENGINE_set_id
70and 95and
71.Xr ENGINE_set_id 3 96.Fn ENGINE_set_name
72before calling this function. 97before calling this function.
73.Fn ENGINE_add 98.Fn ENGINE_add
74fails if the list already contains an 99fails if the list already contains an
@@ -84,6 +109,26 @@ If successful, it calls
84on 109on
85.Fa e . 110.Fa e .
86.Pp 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
87.Fn ENGINE_get_first 132.Fn ENGINE_get_first
88and 133and
89.Fn ENGINE_get_last 134.Fn ENGINE_get_last
@@ -109,13 +154,40 @@ searches the list for an
109.Vt ENGINE 154.Vt ENGINE
110object with a matching 155object with a matching
111.Fa id . 156.Fa id .
112If found, it increments the structural reference count of the 157If found, it increments the structural reference count of the
113retrieved object by 1. 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.
114.Sh RETURN VALUES 167.Sh RETURN VALUES
115.Fn ENGINE_add 168.Fn ENGINE_add ,
169.Fn ENGINE_set_id ,
170.Fn ENGINE_set_name ,
116and 171and
117.Fn ENGINE_remove 172.Fn ENGINE_remove
118return 1 on success or 0 on error. 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.
119.Pp 191.Pp
120.Fn ENGINE_get_first 192.Fn ENGINE_get_first
121and 193and