summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-04-15 17:02:03 +0000
committerschwarze <>2018-04-15 17:02:03 +0000
commit8e0d0015d803e2db303942ec42a2e187853cb399 (patch)
tree9e18009b3c6be0ebc7dcf5101e962cea04369f89 /src
parent83e8d72fcb33da2c34c5964418ed6fa3b12d08c7 (diff)
downloadopenbsd-8e0d0015d803e2db303942ec42a2e187853cb399.tar.gz
openbsd-8e0d0015d803e2db303942ec42a2e187853cb399.tar.bz2
openbsd-8e0d0015d803e2db303942ec42a2e187853cb399.zip
Rewrite the ENGINE_*(3) documentation from scratch - step 2,
covering the remaining functions that were documented in engine(3), except for seven functions that are completely pointless and that were merely listed but not really documented.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/ENGINE_add.384
-rw-r--r--src/lib/libcrypto/man/ENGINE_new.3154
-rw-r--r--src/lib/libcrypto/man/ENGINE_register_all_RSA.329
-rw-r--r--src/lib/libcrypto/man/ENGINE_set_RSA.3288
-rw-r--r--src/lib/libcrypto/man/ENGINE_set_flags.379
-rw-r--r--src/lib/libcrypto/man/ENGINE_unregister_RSA.34
-rw-r--r--src/lib/libcrypto/man/Makefile5
-rw-r--r--src/lib/libcrypto/man/engine.3385
8 files changed, 633 insertions, 395 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
diff --git a/src/lib/libcrypto/man/ENGINE_new.3 b/src/lib/libcrypto/man/ENGINE_new.3
new file mode 100644
index 0000000000..ab875ce662
--- /dev/null
+++ b/src/lib/libcrypto/man/ENGINE_new.3
@@ -0,0 +1,154 @@
1.\" $OpenBSD: ENGINE_new.3,v 1.1 2018/04/15 17:02:03 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 15 2018 $
20.Dt ENGINE_NEW 3
21.Os
22.Sh NAME
23.Nm ENGINE_new ,
24.Nm ENGINE_up_ref ,
25.Nm ENGINE_free ,
26.Nm ENGINE_set_destroy_function ,
27.Nm ENGINE_get_destroy_function
28.Nd create and destroy ENGINE objects
29.Sh SYNOPSIS
30.In openssl/engine.h
31.Ft ENGINE *
32.Fn ENGINE_new void
33.Ft int
34.Fo ENGINE_up_ref
35.Fa "ENGINE *e"
36.Fc
37.Ft int
38.Fo ENGINE_free
39.Fa "ENGINE *e"
40.Fc
41.Ft typedef int
42.Fo (*ENGINE_GEN_INT_FUNC_PTR)
43.Fa "ENGINE *e"
44.Fc
45.Ft int
46.Fo ENGINE_set_destroy_function
47.Fa "ENGINE *e"
48.Fa "ENGINE_GEN_INT_FUNC_PTR destroy_f"
49.Fc
50.Ft ENGINE_GEN_INT_FUNC_PTR
51.Fo ENGINE_get_destroy_function
52.Fa "const ENGINE *e"
53.Fc
54.Sh DESCRIPTION
55.Fn ENGINE_new
56allocates and initializes an empty
57.Vt ENGINE
58object and sets its structural reference count to 1
59and its functional reference count to 0.
60For more information about the functional reference count, see the
61.Xr ENGINE_init 3
62manual page.
63.Pp
64Many functions increment the structural reference count by 1
65when successful.
66Some of them, including
67.Xr ENGINE_get_first 3 ,
68.Xr ENGINE_get_last 3 ,
69.Xr ENGINE_get_next 3 ,
70.Xr ENGINE_get_prev 3 ,
71and
72.Xr ENGINE_by_id 3 ,
73do so because they return a structural reference to the user.
74Other functions, including
75.Xr ENGINE_add 3 ,
76.Xr ENGINE_init 3 ,
77.Xr ENGINE_get_cipher_engine 3 ,
78.Xr ENGINE_get_digest_engine 3 ,
79and the
80.Xr ENGINE_get_default_RSA 3
81and
82.Xr ENGINE_set_default 3
83families of functions
84do so when they store a structural refence internally.
85.Pp
86.Fn ENGINE_up_ref
87explicitly increment the structural reference count by 1.
88.Pp
89.Fn ENGINE_free
90decrements the structural reference count by 1,
91and if it reaches 0, the optional
92.Fa destroy_f
93previously installed with
94.Fn ENGINE_set_destroy_function
95is called, if one is installed, and both the memory used internally by
96.Fa e
97and
98.Fa e
99itself are freed.
100If
101.Fa e
102is a
103.Dv NULL
104pointer, no action occurs.
105.Pp
106Many functions internally call the equivalent of
107.Fn ENGINE_free .
108Some of them, including
109.Xr ENGINE_get_next 3
110and
111.Xr ENGINE_get_prev 3 ,
112thus invalidate the structural reference passed in by the user.
113Other functions, including
114.Xr ENGINE_finish 3 ,
115.Xr ENGINE_remove 3 ,
116and the
117.Xr ENGINE_set_default 3
118family of functions
119do so when an internally stored structural reference is no longer needed.
120.Pp
121.Fn ENGINE_set_destroy_function
122installs a callback function that will be called by
123.Fn ENGINE_free ,
124but only when
125.Fa e
126actually gets destroyed,
127not when only its reference count gets decremented.
128The value returned from the
129.Fa destroy_f
130will be ignored.
131.Sh RETURN VALUES
132.Fn ENGINE_new
133returns a structural reference to the new
134.Vt ENGINE
135object or
136.Dv NULL
137if an error occurs.
138.Pp
139.Fn ENGINE_up_ref
140returns 0 if
141.Fa e
142is
143.Dv NULL
144and 1 otherwise.
145.Pp
146.Fn ENGINE_free
147and
148.Fn ENGINE_set_destroy_function
149always return 1.
150.Pp
151.Fn ENGINE_get_destroy_function
152returns a function pointer to the callback, or
153.Dv NULL
154if none is installed.
diff --git a/src/lib/libcrypto/man/ENGINE_register_all_RSA.3 b/src/lib/libcrypto/man/ENGINE_register_all_RSA.3
index f92a12b2f9..cb9a41f2a9 100644
--- a/src/lib/libcrypto/man/ENGINE_register_all_RSA.3
+++ b/src/lib/libcrypto/man/ENGINE_register_all_RSA.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ENGINE_register_all_RSA.3,v 1.1 2018/04/15 01:43:45 schwarze Exp $ 1.\" $OpenBSD: ENGINE_register_all_RSA.3,v 1.2 2018/04/15 17:02:03 schwarze Exp $
2.\" content checked up to: 2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\" 4.\"
@@ -29,7 +29,9 @@
29.Nm ENGINE_register_all_STORE , 29.Nm ENGINE_register_all_STORE ,
30.Nm ENGINE_register_all_ciphers , 30.Nm ENGINE_register_all_ciphers ,
31.Nm ENGINE_register_all_digests , 31.Nm ENGINE_register_all_digests ,
32.Nm ENGINE_register_all_complete 32.Nm ENGINE_register_all_complete ,
33.Nm ENGINE_load_builtin_engines ,
34.Nm ENGINE_load_dynamic
33.Nd register all engines as implementing an algorithm 35.Nd register all engines as implementing an algorithm
34.Sh SYNOPSIS 36.Sh SYNOPSIS
35.In openssl/engine.h 37.In openssl/engine.h
@@ -53,6 +55,10 @@
53.Fn ENGINE_register_all_digests void 55.Fn ENGINE_register_all_digests void
54.Ft int 56.Ft int
55.Fn ENGINE_register_all_complete void 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
56.Sh DESCRIPTION 62.Sh DESCRIPTION
57These functions loop over all the 63These functions loop over all the
58.Vt ENGINE 64.Vt ENGINE
@@ -70,4 +76,21 @@ in this way, except that it skips those
70.Vt ENGINE 76.Vt ENGINE
71objects that have the 77objects that have the
72.Dv ENGINE_FLAGS_NO_REGISTER_ALL 78.Dv ENGINE_FLAGS_NO_REGISTER_ALL
73flag set. 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.
diff --git a/src/lib/libcrypto/man/ENGINE_set_RSA.3 b/src/lib/libcrypto/man/ENGINE_set_RSA.3
new file mode 100644
index 0000000000..d795f55c72
--- /dev/null
+++ b/src/lib/libcrypto/man/ENGINE_set_RSA.3
@@ -0,0 +1,288 @@
1.\" $OpenBSD: ENGINE_set_RSA.3,v 1.1 2018/04/15 17:02:03 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 15 2018 $
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_ECDH ,
28.Nm ENGINE_get_ECDH ,
29.Nm ENGINE_set_ECDSA ,
30.Nm ENGINE_get_ECDSA ,
31.Nm ENGINE_set_DH ,
32.Nm ENGINE_get_DH ,
33.Nm ENGINE_set_RAND ,
34.Nm ENGINE_get_RAND ,
35.Nm ENGINE_set_STORE ,
36.Nm ENGINE_get_STORE ,
37.Nm ENGINE_set_ciphers ,
38.Nm ENGINE_get_ciphers ,
39.Nm ENGINE_get_cipher ,
40.Nm ENGINE_set_digests ,
41.Nm ENGINE_get_digests ,
42.Nm ENGINE_get_digest
43.Nd install and retrieve function tables of crypto engines
44.Sh SYNOPSIS
45.In openssl/engine.h
46.Ft int
47.Fo ENGINE_set_RSA
48.Fa "ENGINE *e"
49.Fa "const RSA_METHOD *rsa_meth"
50.Fc
51.Ft const RSA_METHOD *
52.Fo ENGINE_get_RSA
53.Fa "const ENGINE *e"
54.Fc
55.Ft int
56.Fo ENGINE_set_DSA
57.Fa "ENGINE *e"
58.Fa "const DSA_METHOD *dsa_meth"
59.Fc
60.Ft const DSA_METHOD *
61.Fo ENGINE_get_DSA
62.Fa "const ENGINE *e"
63.Fc
64.Ft int
65.Fo ENGINE_set_ECDH
66.Fa "ENGINE *e"
67.Fa "const ECDH_METHOD *dh_meth"
68.Fc
69.Ft const ECDH_METHOD *
70.Fo ENGINE_get_ECDH
71.Fa "const ENGINE *e"
72.Fc
73.Ft int
74.Fo ENGINE_set_ECDSA
75.Fa "ENGINE *e"
76.Fa "const ECDSA_METHOD *dh_meth"
77.Fc
78.Ft const ECDSA_METHOD *
79.Fo ENGINE_get_ECDSA
80.Fa "const ENGINE *e"
81.Fc
82.Ft int
83.Fo ENGINE_set_DH
84.Fa "ENGINE *e"
85.Fa "const DH_METHOD *dh_meth"
86.Fc
87.Ft const DH_METHOD *
88.Fo ENGINE_get_DH
89.Fa "const ENGINE *e"
90.Fc
91.Ft int
92.Fo ENGINE_set_RAND
93.Fa "ENGINE *e"
94.Fa "const RAND_METHOD *rand_meth"
95.Fc
96.Ft const RAND_METHOD *
97.Fo ENGINE_get_RAND
98.Fa "const ENGINE *e"
99.Fc
100.Ft int
101.Fo ENGINE_set_STORE
102.Fa "ENGINE *e"
103.Fa "const STORE_METHOD *rand_meth"
104.Fc
105.Ft const STORE_METHOD *
106.Fo ENGINE_get_STORE
107.Fa "const ENGINE *e"
108.Fc
109.Ft typedef int
110.Fo (*ENGINE_CIPHERS_PTR)
111.Fa "ENGINE *e"
112.Fa "const EVP_CIPHER **impl"
113.Fa "const int **nids"
114.Fa "int nid"
115.Fc
116.Ft int
117.Fo ENGINE_set_ciphers
118.Fa "ENGINE *e"
119.Fa "ENGINE_CIPHERS_PTR f"
120.Fc
121.Ft ENGINE_CIPHERS_PTR
122.Fo ENGINE_get_ciphers
123.Fa "const ENGINE *e"
124.Fc
125.Ft const EVP_CIPHER *
126.Fo ENGINE_get_cipher
127.Fa "ENGINE *e"
128.Fa "int nid"
129.Fc
130.Ft typedef int
131.Fo (*ENGINE_DIGESTS_PTR)
132.Fa "ENGINE *e"
133.Fa "const EVP_MD **impl"
134.Fa "const int **nids"
135.Fa "int nid"
136.Fc
137.Ft int
138.Fo ENGINE_set_digests
139.Fa "ENGINE *e"
140.Fa "ENGINE_DIGESTS_PTR f"
141.Fc
142.Ft ENGINE_DIGESTS_PTR
143.Fo ENGINE_get_digests
144.Fa "const ENGINE *e"
145.Fc
146.Ft const EVP_MD *
147.Fo ENGINE_get_digest
148.Fa "ENGINE *e"
149.Fa "int nid"
150.Fc
151.Sh DESCRIPTION
152The
153.Fn ENGINE_set_*
154functions install a table of function pointers
155implementing the respective algorithm in
156.Fa e .
157Partial information about the various method objects is available from
158.Xr RSA_meth_new 3 ,
159.Xr RSA_get_default_method 3 ,
160.Xr DSA_meth_new 3 ,
161.Xr DSA_get_default_method 3 ,
162.Fn ECDH_get_default_method ,
163.Xr ECDSA_get_default_method 3 ,
164.Xr DH_get_default_method 3 ,
165.Xr RAND_get_rand_method 3 ,
166.Xr EVP_get_cipherbynid 3 ,
167and
168.Xr EVP_get_digestbynid 3 .
169.Vt STORE_METHOD
170is an incomplete type, and the pointers to it are not used for anything.
171For complete descriptions of these types,
172refer to the respective header files.
173.Pp
174The functions described in the
175.Xr ENGINE_register_RSA 3
176and
177.Xr ENGINE_set_default 3
178manual pages only have an effect after function pointers
179were installed using the functions decribed here.
180.Pp
181.Fn ENGINE_set_ciphers
182and
183.Fn ENGINE_set_digests
184are special in so far as the
185.Vt ENGINE
186structure does not provide fields to store function pointers
187implementing ciphers or digests.
188Instead, these two functions only install a callback to
189retrieve implementations.
190Where the pointers to the implementations are stored internally,
191how they get initialized, and how the
192.Vt ENGINE_CIPHERS_PTR
193and
194.Vt ENGINE_DIGESTS_PTR
195callbacks retrieve them
196is up to the implementation of each individual engine.
197.Pp
198If the
199.Vt ENGINE_CIPHERS_PTR
200and
201.Vt ENGINE_DIGESTS_PTR
202callbacks are called with a non-zero
203.Fa nid ,
204they retrieve the implementation of that cipher or digest,
205respectively.
206In this case, a
207.Dv NULL
208pointer can be passed as the
209.Fa nids
210argument.
211.Fn ENGINE_get_cipher
212and
213.Fn ENGINE_get_digest
214call the callbacks installed in
215.Fa e
216in this way.
217.Pp
218If 0 is passed as the
219.Fa nid
220argument, an internal pointer
221to the array of implementations available in
222.Fa e
223is returned in
224.Pf * Fa impl ,
225and an internal pointer
226to the array of corresponding identifiers in
227.Pf * Fa nids .
228The return value of the callback indicates
229the number of implementations returned.
230.Pp
231The
232.Fn ENGINE_get_*
233functions retrieve the previously installed function tables.
234They are used when constructing basic cryptographic objects
235as shown in the following table:
236.Bl -column "ENGINE_get_digestMM"
237.It Accessor: Ta Called by:
238.It Fn ENGINE_get_RSA Ta Xr RSA_new_method 3 , Xr RSA_new 3
239.It Fn ENGINE_get_DSA Ta Xr DSA_new_method 3 , Xr DSA_new 3
240.It Fn ENGINE_get_ECDH Ta Fn ECDH_set_method , Fn ECDH_compute_key
241.It Fn ENGINE_get_ECDSA Ta Xr ECDSA_set_method 3 , Xr ECDSA_sign_setup 3 ,
242.Xr ECDSA_do_sign_ex 3 , Xr ECDSA_do_verify 3
243.It Fn ENGINE_get_DH Ta Xr DH_new_method 3 , Xr DH_new 3
244.It Fn ENGINE_get_RAND Ta unused
245.It Fn ENGINE_get_STORE Ta unused
246.It Fn ENGINE_get_cipher Ta Xr EVP_CipherInit_ex 3
247.It Fn ENGINE_get_digest Ta Xr EVP_DigestInit_ex 3
248.El
249.Sh RETURN VALUES
250The
251.Fn ENGINE_set_*
252functions return 1 on success or 0 on error.
253Currently, they cannot fail.
254.Pp
255The
256.Fn ENGINE_get_*
257functions return a method object for the respective algorithm, or
258.Dv NULL
259if none is installed.
260.Pp
261.Fn ENGINE_get_ciphers
262and
263.Fn ENGINE_get_digests
264return a function pointer to the respective callback, or
265.Dv NULL
266if none is installed.
267.Pp
268.Fn ENGINE_get_cipher
269returns an
270.Vt EVP_CIPHER
271object implementing the cipher
272.Fa nid
273or
274.Dv NULL
275if
276.Fa e
277does not implement that cipher.
278.Pp
279.Fn ENGINE_get_digest
280returns an
281.Vt EVP_MD
282object implementing the digest
283.Fa nid
284or
285.Dv NULL
286if
287.Fa e
288does not implement that digest.
diff --git a/src/lib/libcrypto/man/ENGINE_set_flags.3 b/src/lib/libcrypto/man/ENGINE_set_flags.3
new file mode 100644
index 0000000000..a4ac107f9e
--- /dev/null
+++ b/src/lib/libcrypto/man/ENGINE_set_flags.3
@@ -0,0 +1,79 @@
1.\" $OpenBSD: ENGINE_set_flags.3,v 1.1 2018/04/15 17:02:03 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 15 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 .
diff --git a/src/lib/libcrypto/man/ENGINE_unregister_RSA.3 b/src/lib/libcrypto/man/ENGINE_unregister_RSA.3
index c596554e86..698bfe105d 100644
--- a/src/lib/libcrypto/man/ENGINE_unregister_RSA.3
+++ b/src/lib/libcrypto/man/ENGINE_unregister_RSA.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ENGINE_unregister_RSA.3,v 1.1 2018/04/15 01:43:45 schwarze Exp $ 1.\" $OpenBSD: ENGINE_unregister_RSA.3,v 1.2 2018/04/15 17:02:03 schwarze Exp $
2.\" content checked up to: 2.\" content checked up to:
3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 3.\" OpenSSL ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\" 4.\"
@@ -85,7 +85,7 @@ as described in the
85and 85and
86.Fn ENGINE_get_default_RSA 3 86.Fn ENGINE_get_default_RSA 3
87manual pages, 87manual pages,
88.Xr ENGINE_finish 88.Xr ENGINE_finish 3
89is also called. 89is also called.
90.Pp 90.Pp
91.Fn ENGINE_unregister_ciphers 91.Fn ENGINE_unregister_ciphers
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index a83ae5d3ed..695485aeeb 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.139 2018/04/15 01:43:45 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.140 2018/04/15 17:02:03 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -101,9 +101,12 @@ MAN= \
101 ENGINE_ctrl.3 \ 101 ENGINE_ctrl.3 \
102 ENGINE_get_default_RSA.3 \ 102 ENGINE_get_default_RSA.3 \
103 ENGINE_init.3 \ 103 ENGINE_init.3 \
104 ENGINE_new.3 \
104 ENGINE_register_RSA.3 \ 105 ENGINE_register_RSA.3 \
105 ENGINE_register_all_RSA.3 \ 106 ENGINE_register_all_RSA.3 \
107 ENGINE_set_RSA.3 \
106 ENGINE_set_default.3 \ 108 ENGINE_set_default.3 \
109 ENGINE_set_flags.3 \
107 ENGINE_unregister_RSA.3 \ 110 ENGINE_unregister_RSA.3 \
108 ERR.3 \ 111 ERR.3 \
109 ERR_GET_LIB.3 \ 112 ERR_GET_LIB.3 \
diff --git a/src/lib/libcrypto/man/engine.3 b/src/lib/libcrypto/man/engine.3
index fac4fa13e1..ebcc95f310 100644
--- a/src/lib/libcrypto/man/engine.3
+++ b/src/lib/libcrypto/man/engine.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: engine.3,v 1.15 2018/04/15 01:43:45 schwarze Exp $ 1.\" $OpenBSD: engine.3,v 1.16 2018/04/15 17:02:03 schwarze Exp $
2.\" full merge up to: OpenSSL crypto/engine e6390aca Jul 21 10:06:03 2015 -0400 2.\" full merge up to: OpenSSL crypto/engine e6390aca Jul 21 10:06:03 2015 -0400
3.\" selective merge up to: man3/ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800 3.\" selective merge up to: man3/ENGINE_add 1f13ad31 Dec 25 17:50:39 2017 +0800
4.\" 4.\"
@@ -55,227 +55,8 @@
55.Dt ENGINE 3 55.Dt ENGINE 3
56.Os 56.Os
57.Sh NAME 57.Sh NAME
58.Nm ENGINE_load_openssl , 58.Nm engine
59.Nm ENGINE_load_dynamic ,
60.Nm ENGINE_load_builtin_engines ,
61.Nm ENGINE_cleanup ,
62.Nm ENGINE_new ,
63.Nm ENGINE_free ,
64.Nm ENGINE_up_ref ,
65.Nm ENGINE_set_id ,
66.Nm ENGINE_set_name ,
67.Nm ENGINE_set_RSA ,
68.Nm ENGINE_set_DSA ,
69.Nm ENGINE_set_ECDH ,
70.Nm ENGINE_set_ECDSA ,
71.Nm ENGINE_set_DH ,
72.Nm ENGINE_set_RAND ,
73.Nm ENGINE_set_STORE ,
74.Nm ENGINE_set_destroy_function ,
75.Nm ENGINE_set_load_privkey_function ,
76.Nm ENGINE_set_load_pubkey_function ,
77.Nm ENGINE_set_ciphers ,
78.Nm ENGINE_set_digests ,
79.Nm ENGINE_set_flags ,
80.Nm ENGINE_get_id ,
81.Nm ENGINE_get_name ,
82.Nm ENGINE_get_RSA ,
83.Nm ENGINE_get_DSA ,
84.Nm ENGINE_get_ECDH ,
85.Nm ENGINE_get_ECDSA ,
86.Nm ENGINE_get_DH ,
87.Nm ENGINE_get_RAND ,
88.Nm ENGINE_get_STORE ,
89.Nm ENGINE_get_destroy_function ,
90.Nm ENGINE_get_load_privkey_function ,
91.Nm ENGINE_get_load_pubkey_function ,
92.Nm ENGINE_get_ciphers ,
93.Nm ENGINE_get_digests ,
94.Nm ENGINE_get_cipher ,
95.Nm ENGINE_get_digest ,
96.Nm ENGINE_get_flags ,
97.Nm ENGINE_load_private_key ,
98.Nm ENGINE_load_public_key
99.Nd ENGINE cryptographic module support 59.Nd ENGINE cryptographic module support
100.Sh SYNOPSIS
101.In openssl/engine.h
102.Ft void
103.Fn ENGINE_load_openssl void
104.Ft void
105.Fn ENGINE_load_dynamic void
106.Ft void
107.Fn ENGINE_load_builtin_engines void
108.Ft void
109.Fn ENGINE_cleanup void
110.Ft ENGINE *
111.Fn ENGINE_new void
112.Ft int
113.Fo ENGINE_free
114.Fa "ENGINE *e"
115.Fc
116.Ft int
117.Fo ENGINE_up_ref
118.Fa "ENGINE *e"
119.Fc
120.Ft int
121.Fo ENGINE_set_id
122.Fa "ENGINE *e"
123.Fa "const char *id"
124.Fc
125.Ft int
126.Fo ENGINE_set_name
127.Fa "ENGINE *e"
128.Fa "const char *name"
129.Fc
130.Ft int
131.Fo ENGINE_set_RSA
132.Fa "ENGINE *e"
133.Fa "const RSA_METHOD *rsa_meth"
134.Fc
135.Ft int
136.Fo ENGINE_set_DSA
137.Fa "ENGINE *e"
138.Fa "const DSA_METHOD *dsa_meth"
139.Fc
140.Ft int
141.Fo ENGINE_set_ECDH
142.Fa "ENGINE *e"
143.Fa "const ECDH_METHOD *dh_meth"
144.Fc
145.Ft int
146.Fo ENGINE_set_ECDSA
147.Fa "ENGINE *e"
148.Fa "const ECDSA_METHOD *dh_meth"
149.Fc
150.Ft int
151.Fo ENGINE_set_DH
152.Fa "ENGINE *e"
153.Fa "const DH_METHOD *dh_meth"
154.Fc
155.Ft int
156.Fo ENGINE_set_RAND
157.Fa "ENGINE *e"
158.Fa "const RAND_METHOD *rand_meth"
159.Fc
160.Ft int
161.Fo ENGINE_set_STORE
162.Fa "ENGINE *e"
163.Fa "const STORE_METHOD *rand_meth"
164.Fc
165.Ft int
166.Fo ENGINE_set_destroy_function
167.Fa "ENGINE *e"
168.Fa "ENGINE_GEN_INT_FUNC_PTR destroy_f"
169.Fc
170.Ft int
171.Fo ENGINE_set_load_privkey_function
172.Fa "ENGINE *e"
173.Fa "ENGINE_LOAD_KEY_PTR loadpriv_f"
174.Fc
175.Ft int
176.Fo ENGINE_set_load_pubkey_function
177.Fa "ENGINE *e"
178.Fa "ENGINE_LOAD_KEY_PTR loadpub_f"
179.Fc
180.Ft int
181.Fo ENGINE_set_ciphers
182.Fa "ENGINE *e"
183.Fa "ENGINE_CIPHERS_PTR f"
184.Fc
185.Ft int
186.Fo ENGINE_set_digests
187.Fa "ENGINE *e"
188.Fa "ENGINE_DIGESTS_PTR f"
189.Fc
190.Ft int
191.Fo ENGINE_set_flags
192.Fa "ENGINE *e"
193.Fa "int flags"
194.Fc
195.Ft const char *
196.Fo ENGINE_get_id
197.Fa "const ENGINE *e"
198.Fc
199.Ft const char *
200.Fo ENGINE_get_name
201.Fa "const ENGINE *e"
202.Fc
203.Ft const RSA_METHOD *
204.Fo ENGINE_get_RSA
205.Fa "const ENGINE *e"
206.Fc
207.Ft const DSA_METHOD *
208.Fo ENGINE_get_DSA
209.Fa "const ENGINE *e"
210.Fc
211.Ft const ECDH_METHOD *
212.Fo ENGINE_get_ECDH
213.Fa "const ENGINE *e"
214.Fc
215.Ft const ECDSA_METHOD *
216.Fo ENGINE_get_ECDSA
217.Fa "const ENGINE *e"
218.Fc
219.Ft const DH_METHOD *
220.Fo ENGINE_get_DH
221.Fa "const ENGINE *e"
222.Fc
223.Ft const RAND_METHOD *
224.Fo ENGINE_get_RAND
225.Fa "const ENGINE *e"
226.Fc
227.Ft const STORE_METHOD *
228.Fo ENGINE_get_STORE
229.Fa "const ENGINE *e"
230.Fc
231.Ft ENGINE_GEN_INT_FUNC_PTR
232.Fo ENGINE_get_destroy_function
233.Fa "const ENGINE *e"
234.Fc
235.Ft ENGINE_LOAD_KEY_PTR
236.Fo ENGINE_get_load_privkey_function
237.Fa "const ENGINE *e"
238.Fc
239.Ft ENGINE_LOAD_KEY_PTR
240.Fo ENGINE_get_load_pubkey_function
241.Fa "const ENGINE *e"
242.Fc
243.Ft ENGINE_CIPHERS_PTR
244.Fo ENGINE_get_ciphers
245.Fa "const ENGINE *e"
246.Fc
247.Ft ENGINE_DIGESTS_PTR
248.Fo ENGINE_get_digests
249.Fa "const ENGINE *e"
250.Fc
251.Ft const EVP_CIPHER *
252.Fo ENGINE_get_cipher
253.Fa "ENGINE *e"
254.Fa "int nid"
255.Fc
256.Ft const EVP_MD *
257.Fo ENGINE_get_digest
258.Fa "ENGINE *e"
259.Fa "int nid"
260.Fc
261.Ft int
262.Fo ENGINE_get_flags
263.Fa "const ENGINE *e"
264.Fc
265.Ft EVP_PKEY *
266.Fo ENGINE_load_private_key
267.Fa "ENGINE *e"
268.Fa "const char *key_id"
269.Fa "UI_METHOD *ui_method"
270.Fa "void *callback_data"
271.Fc
272.Ft EVP_PKEY *
273.Fo ENGINE_load_public_key
274.Fa "ENGINE *e"
275.Fa "const char *key_id"
276.Fa "UI_METHOD *ui_method"
277.Fa "void *callback_data"
278.Fc
279.Sh DESCRIPTION 60.Sh DESCRIPTION
280These functions create, manipulate, and use cryptographic modules 61These functions create, manipulate, and use cryptographic modules
281in the form of 62in the form of
@@ -369,64 +150,6 @@ Essentially a structural reference is sufficient if you only need to
369query or manipulate the data of an 150query or manipulate the data of an
370.Vt ENGINE 151.Vt ENGINE
371implementation rather than use its functionality. 152implementation rather than use its functionality.
372.Pp
373.Fn ENGINE_new
374allocates and initializes an empty
375.Vt ENGINE
376object and sets its structural reference count to 1
377and its functional reference count to 0.
378Many functions increment the structural reference count by 1
379when successful.
380Some of them, including
381.Xr ENGINE_by_id 3 ,
382.Xr ENGINE_get_first 3 ,
383.Xr ENGINE_get_last 3 ,
384.Xr ENGINE_get_next 3 ,
385and
386.Xr ENGINE_get_prev 3 ,
387do so because they return a structural reference to the user.
388Other functions, including
389.Xr ENGINE_add 3 ,
390.Xr ENGINE_init 3 ,
391.Xr ENGINE_get_cipher_engine 3 ,
392.Xr ENGINE_get_digest_engine 3 ,
393and the
394.Xr ENGINE_get_default_RSA 3
395and
396.Xr ENGINE_set_default 3
397families of functions
398do so because they store a structural refence internally.
399.Fn ENGINE_up_ref
400explicitly increment the structural reference count by 1.
401.Pp
402.Fn ENGINE_free
403decrements the structural reference count by 1,
404and if it reaches 0, the cleanup function associated with
405.Fa e
406is called, and both the memory used internally by
407.Fa e
408and
409.Fa e
410itself are freed.
411If
412.Fa e
413is a
414.Dv NULL
415pointer, no action occurs.
416Many functions internally call the equivalent of
417.Fn ENGINE_free .
418Some of them, including
419.Xr ENGINE_get_next 3
420and
421.Xr ENGINE_get_prev 3 ,
422thus invalidate the structural reference passed in by the user.
423Other functions, including
424.Xr ENGINE_finish 3 ,
425.Xr ENGINE_remove 3 ,
426and the
427.Xr ENGINE_set_default 3
428family of functions
429do so when an internally stored structural reference is no longer needed.
430.Ss Application requirements 153.Ss Application requirements
431This section will explain the basic things an application programmer 154This section will explain the basic things an application programmer
432should support to make the most useful elements of the 155should support to make the most useful elements of the
@@ -450,15 +173,6 @@ code at all.
450So the first consideration is whether any/all available 173So the first consideration is whether any/all available
451.Vt ENGINE 174.Vt ENGINE
452implementations should be made visible to OpenSSL. 175implementations should be made visible to OpenSSL.
453This is controlled by calling the various "load" functions, e.g.
454.Fn ENGINE_load_builtin_engines
455to make all
456.Vt ENGINE
457implementations bundled with OpenSSL available.
458.Pp
459Note that
460.Fn ENGINE_load_dynamic
461is a placeholder and does not enable dynamic engine loading support.
462.Pp 176.Pp
463Having called any of these functions, 177Having called any of these functions,
464.Vt ENGINE 178.Vt ENGINE
@@ -466,33 +180,6 @@ objects would have been dynamically allocated and populated with
466these implementations and linked into OpenSSL's internal linked 180these implementations and linked into OpenSSL's internal linked
467list. 181list.
468.Pp 182.Pp
469If no
470.Nm engine
471API functions are called at all in an application, then there are
472no inherent memory leaks to worry about from the
473.Nm engine
474functionality, however if any
475.Vt ENGINE Ns s
476are loaded, even if they are never registered or used, it is necessary
477to use the
478.Fn ENGINE_cleanup
479function to correspondingly cleanup before program exit, if the caller
480wishes to avoid memory leaks.
481This mechanism uses an internal callback registration table so that any
482.Nm engine
483API functionality that knows it requires cleanup can register its
484cleanup details to be called during
485.Fn ENGINE_cleanup .
486This approach allows
487.Fn ENGINE_cleanup
488to clean up after any
489.Nm engine
490functionality at all that your program uses, yet doesn't automatically
491create linker dependencies to all possible
492.Nm engine
493functionality - only the cleanup callbacks required by the functionality
494you do use will be required by the linker.
495.Pp
496The fact that 183The fact that
497.Vt ENGINE Ns s 184.Vt ENGINE Ns s
498are made visible to OpenSSL (and thus are linked into the program 185are made visible to OpenSSL (and thus are linked into the program
@@ -836,74 +523,6 @@ to see if they implement "FOO_GET_VENDOR_LOGO_GIF" - and
836.Vt ENGINE 523.Vt ENGINE
837could therefore decide whether or not to support this "foo"-specific 524could therefore decide whether or not to support this "foo"-specific
838extension). 525extension).
839.Sh RETURN VALUES
840.Fn ENGINE_get_cipher_engine ,
841.Fn ENGINE_get_digest_engine ,
842and
843.Fn ENGINE_new
844return a valid
845.Vt ENGINE
846structure or
847.Dv NULL
848if an error occurred.
849.Pp
850.Fn ENGINE_free ,
851.Fn ENGINE_up_ref ,
852and all
853.Fn ENGINE_set_*
854functions return 1 on success or 0 on error.
855.Pp
856.Fn ENGINE_get_id
857and
858.Fn ENGINE_get_name
859return a pointer to an internal string representing the identifier
860and the name of
861.Fa e ,
862respectively.
863.Pp
864.Fn ENGINE_get_RSA ,
865.Fn ENGINE_get_DSA ,
866.Fn ENGINE_get_DH ,
867.Fn ENGINE_get_RAND ,
868and
869.Fn ENGINE_get_STORE
870return a method structure for the respective algorithm.
871.Pp
872.Fn ENGINE_get_destroy_function ,
873.Fn ENGINE_get_load_privkey_function ,
874.Fn ENGINE_get_load_pubkey_function ,
875.Fn ENGINE_get_ciphers ,
876and
877.Fn ENGINE_get_digests
878return a function pointer to the respective callback.
879.Pp
880.Fn ENGINE_get_cipher
881returns a valid
882.Vt EVP_CIPHER
883structure on success or
884.Dv NULL
885if an error occurred.
886.Pp
887.Fn ENGINE_get_digest
888returns a valid
889.Vt EVP_MD
890structure on success or
891.Dv NULL
892if an error occurred.
893.Pp
894.Fn ENGINE_get_flags
895returns an integer representing the flags
896which are used to control various behaviours of an
897.Vt ENGINE .
898.Pp
899.Fn ENGINE_load_private_key
900and
901.Fn ENGINE_load_public_key
902return a valid
903.Vt EVP_PKEY
904structure on success or
905.Dv NULL
906if an error occurred.
907.Sh SEE ALSO 526.Sh SEE ALSO
908.Xr DH_new 3 , 527.Xr DH_new 3 ,
909.Xr DSA_new 3 , 528.Xr DSA_new 3 ,