diff options
author | schwarze <> | 2018-04-15 01:43:45 +0000 |
---|---|---|
committer | schwarze <> | 2018-04-15 01:43:45 +0000 |
commit | 83e8d72fcb33da2c34c5964418ed6fa3b12d08c7 (patch) | |
tree | b200b1089b2fc8e8d079bc4aa2d58db943197f7c /src/lib/libcrypto/man/ENGINE_add.3 | |
parent | ca2431d035ec6e4a115f384ff029c2316dd0d465 (diff) | |
download | openbsd-83e8d72fcb33da2c34c5964418ed6fa3b12d08c7.tar.gz openbsd-83e8d72fcb33da2c34c5964418ed6fa3b12d08c7.tar.bz2 openbsd-83e8d72fcb33da2c34c5964418ed6fa3b12d08c7.zip |
Rewrite the ENGINE_*(3) documentation from scratch (step 1,
covering 60% of the documented functions). The old, abominable
engine(3) manual page shall die soon.
Diffstat (limited to 'src/lib/libcrypto/man/ENGINE_add.3')
-rw-r--r-- | src/lib/libcrypto/man/ENGINE_add.3 | 143 |
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 | ||
57 | The crypto library maintains a global list of | ||
58 | .Vt ENGINE | ||
59 | objects. | ||
60 | .Pp | ||
61 | .Fn ENGINE_add | ||
62 | appends | ||
63 | .Fa e | ||
64 | to the end of the list | ||
65 | and increments its structural reference count by 1. | ||
66 | The name and identifier of | ||
67 | .Fa e | ||
68 | have to be set with | ||
69 | .Xr ENGINE_set_name 3 | ||
70 | and | ||
71 | .Xr ENGINE_set_id 3 | ||
72 | before calling this function. | ||
73 | .Fn ENGINE_add | ||
74 | fails if the list already contains an | ||
75 | .Vt ENGINE | ||
76 | with the same identifier. | ||
77 | .Pp | ||
78 | .Fn ENGINE_remove | ||
79 | removes | ||
80 | .Fa e | ||
81 | from the list. | ||
82 | If successful, it calls | ||
83 | .Xr ENGINE_free 3 | ||
84 | on | ||
85 | .Fa e . | ||
86 | .Pp | ||
87 | .Fn ENGINE_get_first | ||
88 | and | ||
89 | .Fn ENGINE_get_last | ||
90 | provide access to the first and last | ||
91 | .Vt ENGINE | ||
92 | object on the list, respectively. | ||
93 | Unless the list is empty, they increment the structural reference | ||
94 | count of the retrieved object by 1. | ||
95 | .Pp | ||
96 | .Fn ENGINE_get_next | ||
97 | and | ||
98 | .Fn ENGINE_get_prev | ||
99 | support iteration of the list. | ||
100 | They always call | ||
101 | .Xr ENGINE_free 3 | ||
102 | on | ||
103 | .Fa e . | ||
104 | Unless the end of the list is reached, they increment the structural | ||
105 | reference count of the retrieved object by 1. | ||
106 | .Pp | ||
107 | .Fn ENGINE_by_id | ||
108 | searches the list for an | ||
109 | .Vt ENGINE | ||
110 | object with a matching | ||
111 | .Fa id . | ||
112 | If found, it increments the structural reference count of the | ||
113 | retrieved object by 1. | ||
114 | .Sh RETURN VALUES | ||
115 | .Fn ENGINE_add | ||
116 | and | ||
117 | .Fn ENGINE_remove | ||
118 | return 1 on success or 0 on error. | ||
119 | .Pp | ||
120 | .Fn ENGINE_get_first | ||
121 | and | ||
122 | .Fn ENGINE_get_last | ||
123 | return an | ||
124 | .Vt ENGINE | ||
125 | object or | ||
126 | .Dv NULL | ||
127 | if the list is empty. | ||
128 | .Pp | ||
129 | .Fn ENGINE_get_next | ||
130 | and | ||
131 | .Fn ENGINE_get_prev | ||
132 | return an | ||
133 | .Vt ENGINE | ||
134 | object or | ||
135 | .Dv NULL | ||
136 | when the end of the list is reached. | ||
137 | .Pp | ||
138 | .Fn ENGINE_by_id | ||
139 | returns an | ||
140 | .Vt ENGINE | ||
141 | object or | ||
142 | .Dv NULL | ||
143 | if no matching object is found. | ||