Lines Matching refs:ENGINE
5 engine - ENGINE cryptographic module support
11 ENGINE *ENGINE_get_first(void);
12 ENGINE *ENGINE_get_last(void);
13 ENGINE *ENGINE_get_next(ENGINE *e);
14 ENGINE *ENGINE_get_prev(ENGINE *e);
16 int ENGINE_add(ENGINE *e);
17 int ENGINE_remove(ENGINE *e);
19 ENGINE *ENGINE_by_id(const char *id);
21 int ENGINE_init(ENGINE *e);
22 int ENGINE_finish(ENGINE *e);
42 ENGINE *ENGINE_get_default_RSA(void);
43 ENGINE *ENGINE_get_default_DSA(void);
44 ENGINE *ENGINE_get_default_ECDH(void);
45 ENGINE *ENGINE_get_default_ECDSA(void);
46 ENGINE *ENGINE_get_default_DH(void);
47 ENGINE *ENGINE_get_default_RAND(void);
48 ENGINE *ENGINE_get_cipher_engine(int nid);
49 ENGINE *ENGINE_get_digest_engine(int nid);
51 int ENGINE_set_default_RSA(ENGINE *e);
52 int ENGINE_set_default_DSA(ENGINE *e);
53 int ENGINE_set_default_ECDH(ENGINE *e);
54 int ENGINE_set_default_ECDSA(ENGINE *e);
55 int ENGINE_set_default_DH(ENGINE *e);
56 int ENGINE_set_default_RAND(ENGINE *e);
57 int ENGINE_set_default_ciphers(ENGINE *e);
58 int ENGINE_set_default_digests(ENGINE *e);
59 int ENGINE_set_default_string(ENGINE *e, const char *list);
61 int ENGINE_set_default(ENGINE *e, unsigned int flags);
66 int ENGINE_register_RSA(ENGINE *e);
67 void ENGINE_unregister_RSA(ENGINE *e);
69 int ENGINE_register_DSA(ENGINE *e);
70 void ENGINE_unregister_DSA(ENGINE *e);
72 int ENGINE_register_ECDH(ENGINE *e);
73 void ENGINE_unregister_ECDH(ENGINE *e);
75 int ENGINE_register_ECDSA(ENGINE *e);
76 void ENGINE_unregister_ECDSA(ENGINE *e);
78 int ENGINE_register_DH(ENGINE *e);
79 void ENGINE_unregister_DH(ENGINE *e);
81 int ENGINE_register_RAND(ENGINE *e);
82 void ENGINE_unregister_RAND(ENGINE *e);
84 int ENGINE_register_STORE(ENGINE *e);
85 void ENGINE_unregister_STORE(ENGINE *e);
87 int ENGINE_register_ciphers(ENGINE *e);
88 void ENGINE_unregister_ciphers(ENGINE *e);
90 int ENGINE_register_digests(ENGINE *e);
91 void ENGINE_unregister_digests(ENGINE *e);
93 int ENGINE_register_complete(ENGINE *e);
96 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
97 int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
98 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
100 int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
103 int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
104 void *ENGINE_get_ex_data(const ENGINE *e, int idx);
109 ENGINE *ENGINE_new(void);
110 int ENGINE_free(ENGINE *e);
111 int ENGINE_up_ref(ENGINE *e);
113 int ENGINE_set_id(ENGINE *e, const char *id);
114 int ENGINE_set_name(ENGINE *e, const char *name);
115 int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
116 int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
117 int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *dh_meth);
118 int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *dh_meth);
119 int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
120 int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
121 int ENGINE_set_STORE(ENGINE *e, const STORE_METHOD *rand_meth);
122 int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f);
123 int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
124 int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
125 int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
126 int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
127 int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
128 int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
129 int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
130 int ENGINE_set_flags(ENGINE *e, int flags);
131 int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
133 const char *ENGINE_get_id(const ENGINE *e);
134 const char *ENGINE_get_name(const ENGINE *e);
135 const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);
136 const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
137 const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e);
138 const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e);
139 const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
140 const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
141 const STORE_METHOD *ENGINE_get_STORE(const ENGINE *e);
142 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
143 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
144 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
145 ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
146 ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
147 ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
148 ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
149 ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
150 const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
151 const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
152 int ENGINE_get_flags(const ENGINE *e);
153 const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
155 EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
157 EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
165 form of B<ENGINE> objects. These objects act as containers for
170 The cryptographic functionality that can be provided by an B<ENGINE>
182 Due to the modular nature of the ENGINE API, pointers to ENGINEs need to be
184 the underlying ENGINE object. Ie. one should obtain a new reference when
185 making copies of an ENGINE pointer if the copies will be used (and
188 ENGINE objects have two levels of reference-counting to match the way in
189 which the objects are used. At the most basic level, each ENGINE pointer is
194 However, a structural reference provides no guarantee that the ENGINE is
198 support specialised hardware. To use an ENGINE's functionality, you need a
204 ENGINE, you have a guarantee that the ENGINE has been initialised ready to
212 ENGINEs, reading information about an ENGINE, etc. Essentially a structural
214 an ENGINE implementation rather than use its functionality.
217 ENGINE object. There are other ENGINE API functions that return structural
221 ENGINE object itself will only actually be cleaned up and deallocated when
224 It should also be noted that many ENGINE API function calls that accept a
226 this happens whenever the supplied ENGINE will be needed by OpenSSL after
227 the function has returned. Eg. the function to add a new ENGINE to
235 ENGINE list - they will return a new structural reference to the next (or
236 previous) ENGINE in the list or NULL if at the end (or beginning) of the
247 functionality of an ENGINE is required to be available. A functional
249 reference to the required ENGINE, or by asking OpenSSL for the default
250 operational ENGINE for a given cryptographic purpose.
253 call the ENGINE_init() function. This returns zero if the ENGINE was not
256 return non-zero to indicate that the ENGINE is now operational and will
257 have allocated a new B<functional> reference to the ENGINE. All functional
270 For each supported abstraction, the ENGINE code maintains an internal table
280 When a default ENGINE is requested for a given abstraction/algorithm/mode, (eg.
282 ENGINE subsystem to process the corresponding state table and return a
283 functional reference to an initialised ENGINE whose implementation should be
284 used. If no ENGINE should (or can) be used, it will return NULL and the caller
285 will operate with a NULL ENGINE handle - this usually equates to using the
287 then on behave the way it used to before the ENGINE API existed.
293 operational. If it returns a functional reference to an ENGINE, it will
296 response if no ENGINE was available so that future queries won't repeat the
300 instead the only way for the state table to return a non-NULL ENGINE to the
311 support to make the most useful elements of the ENGINE functionality
313 programmer wishes to make alternative ENGINE modules available to the
316 empty and in fact if an application does not call any ENGINE API calls and
318 binary will not contain any alternative ENGINE code at all. So the first
319 consideration is whether any/all available ENGINE implementations should be
323 /* Make the "dynamic" ENGINE available */
330 /* Make ALL ENGINE implementations bundled with OpenSSL available */
333 Having called any of these functions, ENGINE objects would have been
340 If no ENGINE API functions are called at all in an application, then there
341 are no inherent memory leaks to worry about from the ENGINE functionality,
346 so that any ENGINE API functionality that knows it requires cleanup can
348 approach allows ENGINE_cleanup() to clean up after any ENGINE functionality
350 dependencies to all possible ENGINE functionality - only the cleanup
358 will want to allow the user to specify exactly which ENGINE they want used
360 OpenSSL automatically use at run-time any ENGINE that is able to
368 I<Using a specific ENGINE implementation>
371 to want to use the "ACME" ENGINE if it is available in the version of
377 ENGINE *e;
400 I<Automatically using builtin ENGINE implementations>
402 Here we'll assume we want to load and register all ENGINE implementations
404 OpenSSL - if there is an ENGINE that implements it and can be initialise,
414 ENGINE_init() and if any of those succeed, that ENGINE will be set as the
419 There is a mechanism supported by the ENGINE framework that allows each
420 ENGINE implementation to define an arbitrary set of configuration
426 possible for the application to dynamically interrogate the loaded ENGINE
429 scheme. However, if the user is expected to know which ENGINE device he/she
443 passed to an ENGINE B<before> attempting to initialise it, ie. before
447 in some cases both. ENGINE implementations should provide indications of
451 I<Issuing control commands to an ENGINE>
454 name of the ENGINE it wishes to use, a table of string-pairs for use before
458 cases but the name can not. This function should initialise the ENGINE
467 ENGINE *e = ENGINE_by_id(engine_id);
502 failure if the ENGINE supported the given command name but failed while
503 executing it, if the ENGINE doesn't support the command name it will simply
505 only supplying commands specific to the given ENGINE so we set this to
511 and input parameters of the control commands supported by an ENGINE using a
514 ENGINE, ie. the ENGINE's ctrl() handler is not used for the control command.
521 commands implemented by a given ENGINE, specifically the commands;
534 they use various properties exposed by each ENGINE to process these
535 queries. An ENGINE has 3 properties it exposes that can affect how this behaves;
537 the ENGINE's flags, and it can expose an array of control command descriptions.
538 If an ENGINE specifies the ENGINE_FLAGS_MANUAL_CMD_CTRL flag, then it will
539 simply pass all these "core" control commands directly to the ENGINE's ctrl()
540 handler (and thus, it must have supplied one), so it is up to the ENGINE to
554 If the ENGINE's array of control commands is empty then all other commands will
556 the first command supported by the ENGINE, ENGINE_GET_NEXT_CMD_TYPE takes the
557 identifier of a command supported by the ENGINE and returns the next command
574 for any higher-level ENGINE functions such as ENGINE_ctrl_cmd_string().
579 discovery mechanisms simply to allow applications determinie if an ENGINE
582 and ENGINE could therefore decide whether or not to support this "foo"-specific
587 The ENGINE API and internal architecture is currently being reviewed. Slated for
589 ENGINEs (built as self-contained shared-libraries). This would allow ENGINE
592 applications to explicitly use the "dynamic" ENGINE to bind to shared-library