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.3143
1 files changed, 143 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/ENGINE_add.3 b/src/lib/libcrypto/man/ENGINE_add.3
new file mode 100644
index 0000000000..faecb8a2ab
--- /dev/null
+++ b/src/lib/libcrypto/man/ENGINE_add.3
@@ -0,0 +1,143 @@
1.\" $OpenBSD: ENGINE_add.3,v 1.1 2018/04/15 01:43:45 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 15 2018 $
19.Dt ENGINE_ADD 3
20.Os
21.Sh NAME
22.Nm ENGINE_add ,
23.Nm ENGINE_remove ,
24.Nm ENGINE_get_first ,
25.Nm ENGINE_get_last ,
26.Nm ENGINE_get_next ,
27.Nm ENGINE_get_prev ,
28.Nm ENGINE_by_id
29.Nd maintain a global list of ENGINE objects
30.Sh SYNOPSIS
31.In openssl/engine.h
32.Ft int
33.Fo ENGINE_add
34.Fa "ENGINE *e"
35.Fc
36.Ft int
37.Fo ENGINE_remove
38.Fa "ENGINE *e"
39.Fc
40.Ft ENGINE *
41.Fn ENGINE_get_first void
42.Ft ENGINE *
43.Fn ENGINE_get_last void
44.Ft ENGINE *
45.Fo ENGINE_get_next
46.Fa "ENGINE *e"
47.Fc
48.Ft ENGINE *
49.Fo ENGINE_get_prev
50.Fa "ENGINE *e"
51.Fc
52.Ft ENGINE *
53.Fo ENGINE_by_id
54.Fa "const char *id"
55.Fc
56.Sh DESCRIPTION
57The crypto library maintains a global list of
58.Vt ENGINE
59objects.
60.Pp
61.Fn ENGINE_add
62appends
63.Fa e
64to the end of the list
65and increments its structural reference count by 1.
66The name and identifier of
67.Fa e
68have to be set with
69.Xr ENGINE_set_name 3
70and
71.Xr ENGINE_set_id 3
72before calling this function.
73.Fn ENGINE_add
74fails if the list already contains an
75.Vt ENGINE
76with the same identifier.
77.Pp
78.Fn ENGINE_remove
79removes
80.Fa e
81from the list.
82If successful, it calls
83.Xr ENGINE_free 3
84on
85.Fa e .
86.Pp
87.Fn ENGINE_get_first
88and
89.Fn ENGINE_get_last
90provide access to the first and last
91.Vt ENGINE
92object on the list, respectively.
93Unless the list is empty, they increment the structural reference
94count of the retrieved object by 1.
95.Pp
96.Fn ENGINE_get_next
97and
98.Fn ENGINE_get_prev
99support iteration of the list.
100They always call
101.Xr ENGINE_free 3
102on
103.Fa e .
104Unless the end of the list is reached, they increment the structural
105reference count of the retrieved object by 1.
106.Pp
107.Fn ENGINE_by_id
108searches the list for an
109.Vt ENGINE
110object with a matching
111.Fa id .
112If found, it increments the structural reference count of the
113retrieved object by 1.
114.Sh RETURN VALUES
115.Fn ENGINE_add
116and
117.Fn ENGINE_remove
118return 1 on success or 0 on error.
119.Pp
120.Fn ENGINE_get_first
121and
122.Fn ENGINE_get_last
123return an
124.Vt ENGINE
125object or
126.Dv NULL
127if the list is empty.
128.Pp
129.Fn ENGINE_get_next
130and
131.Fn ENGINE_get_prev
132return an
133.Vt ENGINE
134object or
135.Dv NULL
136when the end of the list is reached.
137.Pp
138.Fn ENGINE_by_id
139returns an
140.Vt ENGINE
141object or
142.Dv NULL
143if no matching object is found.