summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ENGINE_init.3
diff options
context:
space:
mode:
authorschwarze <>2018-04-15 01:43:45 +0000
committerschwarze <>2018-04-15 01:43:45 +0000
commit83e8d72fcb33da2c34c5964418ed6fa3b12d08c7 (patch)
treeb200b1089b2fc8e8d079bc4aa2d58db943197f7c /src/lib/libcrypto/man/ENGINE_init.3
parentca2431d035ec6e4a115f384ff029c2316dd0d465 (diff)
downloadopenbsd-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_init.3')
-rw-r--r--src/lib/libcrypto/man/ENGINE_init.3122
1 files changed, 122 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/ENGINE_init.3 b/src/lib/libcrypto/man/ENGINE_init.3
new file mode 100644
index 0000000000..d94c6a8b66
--- /dev/null
+++ b/src/lib/libcrypto/man/ENGINE_init.3
@@ -0,0 +1,122 @@
1.\" $OpenBSD: ENGINE_init.3,v 1.1 2018/04/15 01:43:45 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 15 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_get_default_RSA 3