diff options
Diffstat (limited to 'src/lib/libcrypto/man/engine.3')
| -rw-r--r-- | src/lib/libcrypto/man/engine.3 | 557 |
1 files changed, 28 insertions, 529 deletions
diff --git a/src/lib/libcrypto/man/engine.3 b/src/lib/libcrypto/man/engine.3 index d93f06f024..fac4fa13e1 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.14 2018/04/14 11:38:32 schwarze Exp $ | 1 | .\" $OpenBSD: engine.3,v 1.15 2018/04/15 01:43:45 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 | .\" |
| @@ -51,77 +51,14 @@ | |||
| 51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 53 | .\" | 53 | .\" |
| 54 | .Dd $Mdocdate: April 14 2018 $ | 54 | .Dd $Mdocdate: April 15 2018 $ |
| 55 | .Dt ENGINE 3 | 55 | .Dt ENGINE 3 |
| 56 | .Os | 56 | .Os |
| 57 | .Sh NAME | 57 | .Sh NAME |
| 58 | .Nm ENGINE_get_first , | ||
| 59 | .Nm ENGINE_get_last , | ||
| 60 | .Nm ENGINE_get_next , | ||
| 61 | .Nm ENGINE_get_prev , | ||
| 62 | .Nm ENGINE_add , | ||
| 63 | .Nm ENGINE_remove , | ||
| 64 | .Nm ENGINE_by_id , | ||
| 65 | .Nm ENGINE_init , | ||
| 66 | .Nm ENGINE_finish , | ||
| 67 | .Nm ENGINE_load_openssl , | 58 | .Nm ENGINE_load_openssl , |
| 68 | .Nm ENGINE_load_dynamic , | 59 | .Nm ENGINE_load_dynamic , |
| 69 | .Nm ENGINE_load_cryptodev , | ||
| 70 | .Nm ENGINE_load_builtin_engines , | 60 | .Nm ENGINE_load_builtin_engines , |
| 71 | .Nm ENGINE_cleanup , | 61 | .Nm ENGINE_cleanup , |
| 72 | .Nm ENGINE_get_default_RSA , | ||
| 73 | .Nm ENGINE_get_default_DSA , | ||
| 74 | .Nm ENGINE_get_default_ECDH , | ||
| 75 | .Nm ENGINE_get_default_ECDSA , | ||
| 76 | .Nm ENGINE_get_default_DH , | ||
| 77 | .Nm ENGINE_get_default_RAND , | ||
| 78 | .Nm ENGINE_get_cipher_engine , | ||
| 79 | .Nm ENGINE_get_digest_engine , | ||
| 80 | .Nm ENGINE_set_default_RSA , | ||
| 81 | .Nm ENGINE_set_default_DSA , | ||
| 82 | .Nm ENGINE_set_default_ECDH , | ||
| 83 | .Nm ENGINE_set_default_ECDSA , | ||
| 84 | .Nm ENGINE_set_default_DH , | ||
| 85 | .Nm ENGINE_set_default_RAND , | ||
| 86 | .Nm ENGINE_set_default_ciphers , | ||
| 87 | .Nm ENGINE_set_default_digests , | ||
| 88 | .Nm ENGINE_set_default_string , | ||
| 89 | .Nm ENGINE_set_default , | ||
| 90 | .Nm ENGINE_get_table_flags , | ||
| 91 | .Nm ENGINE_set_table_flags , | ||
| 92 | .Nm ENGINE_register_RSA , | ||
| 93 | .Nm ENGINE_unregister_RSA , | ||
| 94 | .Nm ENGINE_register_all_RSA , | ||
| 95 | .Nm ENGINE_register_DSA , | ||
| 96 | .Nm ENGINE_unregister_DSA , | ||
| 97 | .Nm ENGINE_register_all_DSA , | ||
| 98 | .Nm ENGINE_register_ECDH , | ||
| 99 | .Nm ENGINE_unregister_ECDH , | ||
| 100 | .Nm ENGINE_register_all_ECDH , | ||
| 101 | .Nm ENGINE_register_ECDSA , | ||
| 102 | .Nm ENGINE_unregister_ECDSA , | ||
| 103 | .Nm ENGINE_register_all_ECDSA , | ||
| 104 | .Nm ENGINE_register_DH , | ||
| 105 | .Nm ENGINE_unregister_DH , | ||
| 106 | .Nm ENGINE_register_all_DH , | ||
| 107 | .Nm ENGINE_register_RAND , | ||
| 108 | .Nm ENGINE_unregister_RAND , | ||
| 109 | .Nm ENGINE_register_all_RAND , | ||
| 110 | .Nm ENGINE_register_STORE , | ||
| 111 | .Nm ENGINE_unregister_STORE , | ||
| 112 | .Nm ENGINE_register_all_STORE , | ||
| 113 | .Nm ENGINE_register_ciphers , | ||
| 114 | .Nm ENGINE_unregister_ciphers , | ||
| 115 | .Nm ENGINE_register_all_ciphers , | ||
| 116 | .Nm ENGINE_register_digests , | ||
| 117 | .Nm ENGINE_unregister_digests , | ||
| 118 | .Nm ENGINE_register_all_digests , | ||
| 119 | .Nm ENGINE_register_complete , | ||
| 120 | .Nm ENGINE_register_all_complete , | ||
| 121 | .Nm ENGINE_ctrl , | ||
| 122 | .Nm ENGINE_cmd_is_executable , | ||
| 123 | .Nm ENGINE_ctrl_cmd , | ||
| 124 | .Nm ENGINE_ctrl_cmd_string , | ||
| 125 | .Nm ENGINE_new , | 62 | .Nm ENGINE_new , |
| 126 | .Nm ENGINE_free , | 63 | .Nm ENGINE_free , |
| 127 | .Nm ENGINE_up_ref , | 64 | .Nm ENGINE_up_ref , |
| @@ -135,15 +72,11 @@ | |||
| 135 | .Nm ENGINE_set_RAND , | 72 | .Nm ENGINE_set_RAND , |
| 136 | .Nm ENGINE_set_STORE , | 73 | .Nm ENGINE_set_STORE , |
| 137 | .Nm ENGINE_set_destroy_function , | 74 | .Nm ENGINE_set_destroy_function , |
| 138 | .Nm ENGINE_set_init_function , | ||
| 139 | .Nm ENGINE_set_finish_function , | ||
| 140 | .Nm ENGINE_set_ctrl_function , | ||
| 141 | .Nm ENGINE_set_load_privkey_function , | 75 | .Nm ENGINE_set_load_privkey_function , |
| 142 | .Nm ENGINE_set_load_pubkey_function , | 76 | .Nm ENGINE_set_load_pubkey_function , |
| 143 | .Nm ENGINE_set_ciphers , | 77 | .Nm ENGINE_set_ciphers , |
| 144 | .Nm ENGINE_set_digests , | 78 | .Nm ENGINE_set_digests , |
| 145 | .Nm ENGINE_set_flags , | 79 | .Nm ENGINE_set_flags , |
| 146 | .Nm ENGINE_set_cmd_defns , | ||
| 147 | .Nm ENGINE_get_id , | 80 | .Nm ENGINE_get_id , |
| 148 | .Nm ENGINE_get_name , | 81 | .Nm ENGINE_get_name , |
| 149 | .Nm ENGINE_get_RSA , | 82 | .Nm ENGINE_get_RSA , |
| @@ -154,9 +87,6 @@ | |||
| 154 | .Nm ENGINE_get_RAND , | 87 | .Nm ENGINE_get_RAND , |
| 155 | .Nm ENGINE_get_STORE , | 88 | .Nm ENGINE_get_STORE , |
| 156 | .Nm ENGINE_get_destroy_function , | 89 | .Nm ENGINE_get_destroy_function , |
| 157 | .Nm ENGINE_get_init_function , | ||
| 158 | .Nm ENGINE_get_finish_function , | ||
| 159 | .Nm ENGINE_get_ctrl_function , | ||
| 160 | .Nm ENGINE_get_load_privkey_function , | 90 | .Nm ENGINE_get_load_privkey_function , |
| 161 | .Nm ENGINE_get_load_pubkey_function , | 91 | .Nm ENGINE_get_load_pubkey_function , |
| 162 | .Nm ENGINE_get_ciphers , | 92 | .Nm ENGINE_get_ciphers , |
| @@ -164,248 +94,20 @@ | |||
| 164 | .Nm ENGINE_get_cipher , | 94 | .Nm ENGINE_get_cipher , |
| 165 | .Nm ENGINE_get_digest , | 95 | .Nm ENGINE_get_digest , |
| 166 | .Nm ENGINE_get_flags , | 96 | .Nm ENGINE_get_flags , |
| 167 | .Nm ENGINE_get_cmd_defns , | ||
| 168 | .Nm ENGINE_load_private_key , | 97 | .Nm ENGINE_load_private_key , |
| 169 | .Nm ENGINE_load_public_key | 98 | .Nm ENGINE_load_public_key |
| 170 | .Nd ENGINE cryptographic module support | 99 | .Nd ENGINE cryptographic module support |
| 171 | .Sh SYNOPSIS | 100 | .Sh SYNOPSIS |
| 172 | .In openssl/engine.h | 101 | .In openssl/engine.h |
| 173 | .Ft ENGINE * | ||
| 174 | .Fn ENGINE_get_first void | ||
| 175 | .Ft ENGINE * | ||
| 176 | .Fn ENGINE_get_last void | ||
| 177 | .Ft ENGINE * | ||
| 178 | .Fo ENGINE_get_next | ||
| 179 | .Fa "ENGINE *e" | ||
| 180 | .Fc | ||
| 181 | .Ft ENGINE * | ||
| 182 | .Fo ENGINE_get_prev | ||
| 183 | .Fa "ENGINE *e" | ||
| 184 | .Fc | ||
| 185 | .Ft int | ||
| 186 | .Fo ENGINE_add | ||
| 187 | .Fa "ENGINE *e" | ||
| 188 | .Fc | ||
| 189 | .Ft int | ||
| 190 | .Fo ENGINE_remove | ||
| 191 | .Fa "ENGINE *e" | ||
| 192 | .Fc | ||
| 193 | .Ft ENGINE * | ||
| 194 | .Fo ENGINE_by_id | ||
| 195 | .Fa "const char *id" | ||
| 196 | .Fc | ||
| 197 | .Ft int | ||
| 198 | .Fo ENGINE_init | ||
| 199 | .Fa "ENGINE *e" | ||
| 200 | .Fc | ||
| 201 | .Ft int | ||
| 202 | .Fo ENGINE_finish | ||
| 203 | .Fa "ENGINE *e" | ||
| 204 | .Fc | ||
| 205 | .Ft void | 102 | .Ft void |
| 206 | .Fn ENGINE_load_openssl void | 103 | .Fn ENGINE_load_openssl void |
| 207 | .Ft void | 104 | .Ft void |
| 208 | .Fn ENGINE_load_dynamic void | 105 | .Fn ENGINE_load_dynamic void |
| 209 | .Ft void | 106 | .Ft void |
| 210 | .Fn ENGINE_load_cryptodev void | ||
| 211 | .Ft void | ||
| 212 | .Fn ENGINE_load_builtin_engines void | 107 | .Fn ENGINE_load_builtin_engines void |
| 213 | .Ft void | 108 | .Ft void |
| 214 | .Fn ENGINE_cleanup void | 109 | .Fn ENGINE_cleanup void |
| 215 | .Ft ENGINE * | 110 | .Ft ENGINE * |
| 216 | .Fn ENGINE_get_default_RSA void | ||
| 217 | .Ft ENGINE * | ||
| 218 | .Fn ENGINE_get_default_DSA void | ||
| 219 | .Ft ENGINE * | ||
| 220 | .Fn ENGINE_get_default_ECDH void | ||
| 221 | .Ft ENGINE * | ||
| 222 | .Fn ENGINE_get_default_ECDSA void | ||
| 223 | .Ft ENGINE * | ||
| 224 | .Fn ENGINE_get_default_DH void | ||
| 225 | .Ft ENGINE * | ||
| 226 | .Fn ENGINE_get_default_RAND void | ||
| 227 | .Ft ENGINE * | ||
| 228 | .Fo ENGINE_get_cipher_engine | ||
| 229 | .Fa "int nid" | ||
| 230 | .Fc | ||
| 231 | .Ft ENGINE * | ||
| 232 | .Fo ENGINE_get_digest_engine | ||
| 233 | .Fa "int nid" | ||
| 234 | .Fc | ||
| 235 | .Ft int | ||
| 236 | .Fo ENGINE_set_default_RSA | ||
| 237 | .Fa "ENGINE *e" | ||
| 238 | .Fc | ||
| 239 | .Ft int | ||
| 240 | .Fo ENGINE_set_default_DSA | ||
| 241 | .Fa "ENGINE *e" | ||
| 242 | .Fc | ||
| 243 | .Ft int | ||
| 244 | .Fo ENGINE_set_default_ECDH | ||
| 245 | .Fa "ENGINE *e" | ||
| 246 | .Fc | ||
| 247 | .Ft int | ||
| 248 | .Fo ENGINE_set_default_ECDSA | ||
| 249 | .Fa "ENGINE *e" | ||
| 250 | .Fc | ||
| 251 | .Ft int | ||
| 252 | .Fo ENGINE_set_default_DH | ||
| 253 | .Fa "ENGINE *e" | ||
| 254 | .Fc | ||
| 255 | .Ft int | ||
| 256 | .Fo ENGINE_set_default_RAND | ||
| 257 | .Fa "ENGINE *e" | ||
| 258 | .Fc | ||
| 259 | .Ft int | ||
| 260 | .Fo ENGINE_set_default_ciphers | ||
| 261 | .Fa "ENGINE *e" | ||
| 262 | .Fc | ||
| 263 | .Ft int | ||
| 264 | .Fo ENGINE_set_default_digests | ||
| 265 | .Fa "ENGINE *e" | ||
| 266 | .Fc | ||
| 267 | .Ft int | ||
| 268 | .Fo ENGINE_set_default_string | ||
| 269 | .Fa "ENGINE *e" | ||
| 270 | .Fa "const char *list" | ||
| 271 | .Fc | ||
| 272 | .Ft int | ||
| 273 | .Fo ENGINE_set_default | ||
| 274 | .Fa "ENGINE *e" | ||
| 275 | .Fa "unsigned int flags" | ||
| 276 | .Fc | ||
| 277 | .Ft unsigned int | ||
| 278 | .Fn ENGINE_get_table_flags void | ||
| 279 | .Ft void | ||
| 280 | .Fo ENGINE_set_table_flags | ||
| 281 | .Fa "unsigned int flags" | ||
| 282 | .Fc | ||
| 283 | .Ft int | ||
| 284 | .Fo ENGINE_register_RSA | ||
| 285 | .Fa "ENGINE *e" | ||
| 286 | .Fc | ||
| 287 | .Ft void | ||
| 288 | .Fo ENGINE_unregister_RSA | ||
| 289 | .Fa "ENGINE *e" | ||
| 290 | .Fc | ||
| 291 | .Ft void | ||
| 292 | .Fn ENGINE_register_all_RSA void | ||
| 293 | .Ft int | ||
| 294 | .Fo ENGINE_register_DSA | ||
| 295 | .Fa "ENGINE *e" | ||
| 296 | .Fc | ||
| 297 | .Ft void | ||
| 298 | .Fo ENGINE_unregister_DSA | ||
| 299 | .Fa "ENGINE *e" | ||
| 300 | .Fc | ||
| 301 | .Ft void | ||
| 302 | .Fn ENGINE_register_all_DSA void | ||
| 303 | .Ft int | ||
| 304 | .Fo ENGINE_register_ECDH | ||
| 305 | .Fa "ENGINE *e" | ||
| 306 | .Fc | ||
| 307 | .Ft void | ||
| 308 | .Fo ENGINE_unregister_ECDH | ||
| 309 | .Fa "ENGINE *e" | ||
| 310 | .Fc | ||
| 311 | .Ft void | ||
| 312 | .Fn ENGINE_register_all_ECDH void | ||
| 313 | .Ft int | ||
| 314 | .Fo ENGINE_register_ECDSA | ||
| 315 | .Fa "ENGINE *e" | ||
| 316 | .Fc | ||
| 317 | .Ft void | ||
| 318 | .Fo ENGINE_unregister_ECDSA | ||
| 319 | .Fa "ENGINE *e" | ||
| 320 | .Fc | ||
| 321 | .Ft void | ||
| 322 | .Fn ENGINE_register_all_ECDSA void | ||
| 323 | .Ft int | ||
| 324 | .Fo ENGINE_register_DH | ||
| 325 | .Fa "ENGINE *e" | ||
| 326 | .Fc | ||
| 327 | .Ft void | ||
| 328 | .Fo ENGINE_unregister_DH | ||
| 329 | .Fa "ENGINE *e" | ||
| 330 | .Fc | ||
| 331 | .Ft void | ||
| 332 | .Fn ENGINE_register_all_DH void | ||
| 333 | .Ft int | ||
| 334 | .Fo ENGINE_register_RAND | ||
| 335 | .Fa "ENGINE *e" | ||
| 336 | .Fc | ||
| 337 | .Ft void | ||
| 338 | .Fo ENGINE_unregister_RAND | ||
| 339 | .Fa "ENGINE *e" | ||
| 340 | .Fc | ||
| 341 | .Ft void | ||
| 342 | .Fn ENGINE_register_all_RAND void | ||
| 343 | .Ft int | ||
| 344 | .Fo ENGINE_register_STORE | ||
| 345 | .Fa "ENGINE *e" | ||
| 346 | .Fc | ||
| 347 | .Ft void | ||
| 348 | .Fo ENGINE_unregister_STORE | ||
| 349 | .Fa "ENGINE *e" | ||
| 350 | .Fc | ||
| 351 | .Ft void | ||
| 352 | .Fn ENGINE_register_all_STORE void | ||
| 353 | .Ft int | ||
| 354 | .Fo ENGINE_register_ciphers | ||
| 355 | .Fa "ENGINE *e" | ||
| 356 | .Fc | ||
| 357 | .Ft void | ||
| 358 | .Fo ENGINE_unregister_ciphers | ||
| 359 | .Fa "ENGINE *e" | ||
| 360 | .Fc | ||
| 361 | .Ft void | ||
| 362 | .Fn ENGINE_register_all_ciphers void | ||
| 363 | .Ft int | ||
| 364 | .Fo ENGINE_register_digests | ||
| 365 | .Fa "ENGINE *e" | ||
| 366 | .Fc | ||
| 367 | .Ft void | ||
| 368 | .Fo ENGINE_unregister_digests | ||
| 369 | .Fa "ENGINE *e" | ||
| 370 | .Fc | ||
| 371 | .Ft void | ||
| 372 | .Fn ENGINE_register_all_digests void | ||
| 373 | .Ft int | ||
| 374 | .Fo ENGINE_register_complete | ||
| 375 | .Fa "ENGINE *e" | ||
| 376 | .Fc | ||
| 377 | .Ft int | ||
| 378 | .Fn ENGINE_register_all_complete void | ||
| 379 | .Ft int | ||
| 380 | .Fo ENGINE_ctrl | ||
| 381 | .Fa "ENGINE *e" | ||
| 382 | .Fa "int cmd" | ||
| 383 | .Fa "long i" | ||
| 384 | .Fa "void *p" | ||
| 385 | .Fa "void (*f)(void)" | ||
| 386 | .Fc | ||
| 387 | .Ft int | ||
| 388 | .Fo ENGINE_cmd_is_executable | ||
| 389 | .Fa "ENGINE *e" | ||
| 390 | .Fa "int cmd" | ||
| 391 | .Fc | ||
| 392 | .Ft int | ||
| 393 | .Fo ENGINE_ctrl_cmd | ||
| 394 | .Fa "ENGINE *e" | ||
| 395 | .Fa "const char *cmd_name" | ||
| 396 | .Fa "long i" | ||
| 397 | .Fa "void *p" | ||
| 398 | .Fa "void (*f)(void)" | ||
| 399 | .Fa "int cmd_optional" | ||
| 400 | .Fc | ||
| 401 | .Ft int | ||
| 402 | .Fo ENGINE_ctrl_cmd_string | ||
| 403 | .Fa "ENGINE *e" | ||
| 404 | .Fa "const char *cmd_name" | ||
| 405 | .Fa "const char *arg" | ||
| 406 | .Fa "int cmd_optional" | ||
| 407 | .Fc | ||
| 408 | .Ft ENGINE * | ||
| 409 | .Fn ENGINE_new void | 111 | .Fn ENGINE_new void |
| 410 | .Ft int | 112 | .Ft int |
| 411 | .Fo ENGINE_free | 113 | .Fo ENGINE_free |
| @@ -466,21 +168,6 @@ | |||
| 466 | .Fa "ENGINE_GEN_INT_FUNC_PTR destroy_f" | 168 | .Fa "ENGINE_GEN_INT_FUNC_PTR destroy_f" |
| 467 | .Fc | 169 | .Fc |
| 468 | .Ft int | 170 | .Ft int |
| 469 | .Fo ENGINE_set_init_function | ||
| 470 | .Fa "ENGINE *e" | ||
| 471 | .Fa "ENGINE_GEN_INT_FUNC_PTR init_f" | ||
| 472 | .Fc | ||
| 473 | .Ft int | ||
| 474 | .Fo ENGINE_set_finish_function | ||
| 475 | .Fa "ENGINE *e" | ||
| 476 | .Fa "ENGINE_GEN_INT_FUNC_PTR finish_f" | ||
| 477 | .Fc | ||
| 478 | .Ft int | ||
| 479 | .Fo ENGINE_set_ctrl_function | ||
| 480 | .Fa "ENGINE *e" | ||
| 481 | .Fa "ENGINE_CTRL_FUNC_PTR ctrl_f" | ||
| 482 | .Fc | ||
| 483 | .Ft int | ||
| 484 | .Fo ENGINE_set_load_privkey_function | 171 | .Fo ENGINE_set_load_privkey_function |
| 485 | .Fa "ENGINE *e" | 172 | .Fa "ENGINE *e" |
| 486 | .Fa "ENGINE_LOAD_KEY_PTR loadpriv_f" | 173 | .Fa "ENGINE_LOAD_KEY_PTR loadpriv_f" |
| @@ -505,11 +192,6 @@ | |||
| 505 | .Fa "ENGINE *e" | 192 | .Fa "ENGINE *e" |
| 506 | .Fa "int flags" | 193 | .Fa "int flags" |
| 507 | .Fc | 194 | .Fc |
| 508 | .Ft int | ||
| 509 | .Fo ENGINE_set_cmd_defns | ||
| 510 | .Fa "ENGINE *e" | ||
| 511 | .Fa "const ENGINE_CMD_DEFN *defns" | ||
| 512 | .Fc | ||
| 513 | .Ft const char * | 195 | .Ft const char * |
| 514 | .Fo ENGINE_get_id | 196 | .Fo ENGINE_get_id |
| 515 | .Fa "const ENGINE *e" | 197 | .Fa "const ENGINE *e" |
| @@ -550,18 +232,6 @@ | |||
| 550 | .Fo ENGINE_get_destroy_function | 232 | .Fo ENGINE_get_destroy_function |
| 551 | .Fa "const ENGINE *e" | 233 | .Fa "const ENGINE *e" |
| 552 | .Fc | 234 | .Fc |
| 553 | .Ft ENGINE_GEN_INT_FUNC_PTR | ||
| 554 | .Fo ENGINE_get_init_function | ||
| 555 | .Fa "const ENGINE *e" | ||
| 556 | .Fc | ||
| 557 | .Ft ENGINE_GEN_INT_FUNC_PTR | ||
| 558 | .Fo ENGINE_get_finish_function | ||
| 559 | .Fa "const ENGINE *e" | ||
| 560 | .Fc | ||
| 561 | .Ft ENGINE_CTRL_FUNC_PTR | ||
| 562 | .Fo ENGINE_get_ctrl_function | ||
| 563 | .Fa "const ENGINE *e" | ||
| 564 | .Fc | ||
| 565 | .Ft ENGINE_LOAD_KEY_PTR | 235 | .Ft ENGINE_LOAD_KEY_PTR |
| 566 | .Fo ENGINE_get_load_privkey_function | 236 | .Fo ENGINE_get_load_privkey_function |
| 567 | .Fa "const ENGINE *e" | 237 | .Fa "const ENGINE *e" |
| @@ -592,10 +262,6 @@ | |||
| 592 | .Fo ENGINE_get_flags | 262 | .Fo ENGINE_get_flags |
| 593 | .Fa "const ENGINE *e" | 263 | .Fa "const ENGINE *e" |
| 594 | .Fc | 264 | .Fc |
| 595 | .Ft const ENGINE_CMD_DEFN * | ||
| 596 | .Fo ENGINE_get_cmd_defns | ||
| 597 | .Fa "const ENGINE *e" | ||
| 598 | .Fc | ||
| 599 | .Ft EVP_PKEY * | 265 | .Ft EVP_PKEY * |
| 600 | .Fo ENGINE_load_private_key | 266 | .Fo ENGINE_load_private_key |
| 601 | .Fa "ENGINE *e" | 267 | .Fa "ENGINE *e" |
| @@ -712,20 +378,23 @@ and its functional reference count to 0. | |||
| 712 | Many functions increment the structural reference count by 1 | 378 | Many functions increment the structural reference count by 1 |
| 713 | when successful. | 379 | when successful. |
| 714 | Some of them, including | 380 | Some of them, including |
| 715 | .Fn ENGINE_by_id , | 381 | .Xr ENGINE_by_id 3 , |
| 716 | .Fn ENGINE_get_first , | 382 | .Xr ENGINE_get_first 3 , |
| 717 | .Fn ENGINE_get_last , | 383 | .Xr ENGINE_get_last 3 , |
| 718 | .Fn ENGINE_get_next , | 384 | .Xr ENGINE_get_next 3 , |
| 719 | and | 385 | and |
| 720 | .Fn ENGINE_get_prev , | 386 | .Xr ENGINE_get_prev 3 , |
| 721 | do so because they return a structural reference to the user. | 387 | do so because they return a structural reference to the user. |
| 722 | Other functions, including | 388 | Other functions, including |
| 723 | .Fn ENGINE_add , | 389 | .Xr ENGINE_add 3 , |
| 724 | .Fn ENGINE_init , | 390 | .Xr ENGINE_init 3 , |
| 725 | .Fn ENGINE_get_default_* , | 391 | .Xr ENGINE_get_cipher_engine 3 , |
| 726 | .Fn ENGINE_get_*_engine , | 392 | .Xr ENGINE_get_digest_engine 3 , |
| 393 | and the | ||
| 394 | .Xr ENGINE_get_default_RSA 3 | ||
| 727 | and | 395 | and |
| 728 | .Fn ENGINE_set_default_* , | 396 | .Xr ENGINE_set_default 3 |
| 397 | families of functions | ||
| 729 | do so because they store a structural refence internally. | 398 | do so because they store a structural refence internally. |
| 730 | .Fn ENGINE_up_ref | 399 | .Fn ENGINE_up_ref |
| 731 | explicitly increment the structural reference count by 1. | 400 | explicitly increment the structural reference count by 1. |
| @@ -747,144 +416,17 @@ pointer, no action occurs. | |||
| 747 | Many functions internally call the equivalent of | 416 | Many functions internally call the equivalent of |
| 748 | .Fn ENGINE_free . | 417 | .Fn ENGINE_free . |
| 749 | Some of them, including | 418 | Some of them, including |
| 750 | .Fn ENGINE_get_next | 419 | .Xr ENGINE_get_next 3 |
| 751 | and | 420 | and |
| 752 | .Fn ENGINE_get_prev , | 421 | .Xr ENGINE_get_prev 3 , |
| 753 | thus invalidate the structural reference passed in by the user. | 422 | thus invalidate the structural reference passed in by the user. |
| 754 | Other functions, including | 423 | Other functions, including |
| 755 | .Fn ENGINE_finish , | 424 | .Xr ENGINE_finish 3 , |
| 756 | .Fn ENGINE_remove , | 425 | .Xr ENGINE_remove 3 , |
| 757 | .Fn ENGINE_get_default_* , | 426 | and the |
| 758 | .Fn ENGINE_get_*_engine , | 427 | .Xr ENGINE_set_default 3 |
| 759 | and | 428 | family of functions |
| 760 | .Fn ENGINE_set_default_* , | ||
| 761 | do so when an internally stored structural reference is no longer needed. | 429 | do so when an internally stored structural reference is no longer needed. |
| 762 | .Pp | ||
| 763 | .Em Functional references | ||
| 764 | .Pp | ||
| 765 | As mentioned, functional references exist when the cryptographic | ||
| 766 | functionality of an | ||
| 767 | .Vt ENGINE | ||
| 768 | is required to be available. | ||
| 769 | A functional reference can be obtained in one of two ways; from an | ||
| 770 | existing structural reference to the required | ||
| 771 | .Vt ENGINE , | ||
| 772 | or by asking OpenSSL for the default operational | ||
| 773 | .Vt ENGINE | ||
| 774 | for a given cryptographic purpose. | ||
| 775 | .Pp | ||
| 776 | To obtain a functional reference from an existing structural reference, | ||
| 777 | call the | ||
| 778 | .Fn ENGINE_init | ||
| 779 | function. | ||
| 780 | This returns zero if the | ||
| 781 | .Vt ENGINE | ||
| 782 | was not already operational and couldn't be successfully initialised | ||
| 783 | (e.g. lack of system drivers, no special hardware attached), | ||
| 784 | otherwise it will return non-zero to indicate that the | ||
| 785 | .Vt ENGINE | ||
| 786 | is now operational and will have allocated a new | ||
| 787 | .Sy functional | ||
| 788 | reference to the | ||
| 789 | .Vt ENGINE . | ||
| 790 | All functional references are released by calling | ||
| 791 | .Fn ENGINE_finish , | ||
| 792 | which removes the implicit structural reference as well. | ||
| 793 | .Pp | ||
| 794 | The second way to get a functional reference is by asking OpenSSL for a | ||
| 795 | default implementation for a given task, e.g. | ||
| 796 | by | ||
| 797 | .Fn ENGINE_get_default_RSA , | ||
| 798 | .Fn ENGINE_get_default_cipher_engine , | ||
| 799 | etc. | ||
| 800 | These are discussed in the next section, though they are not usually | ||
| 801 | required by application programmers as they are used automatically when | ||
| 802 | creating and using the relevant algorithm-specific types in OpenSSL, | ||
| 803 | such as RSA, DSA, EVP_CIPHER_CTX, etc. | ||
| 804 | .Ss Default implementations | ||
| 805 | For each supported abstraction, the | ||
| 806 | .Nm engine | ||
| 807 | code maintains an internal table of state to control which | ||
| 808 | implementations are available for a given abstraction and which | ||
| 809 | should be used by default. | ||
| 810 | These implementations are registered in the tables and indexed by an | ||
| 811 | .Fa nid | ||
| 812 | value, because abstractions like | ||
| 813 | .Vt EVP_CIPHER | ||
| 814 | and | ||
| 815 | .Vt EVP_DIGEST | ||
| 816 | support many distinct algorithms and modes, and | ||
| 817 | .Vt ENGINE Ns s | ||
| 818 | can support arbitrarily many of them. | ||
| 819 | In the case of other abstractions like RSA, DSA, etc., there is | ||
| 820 | only one "algorithm" so all implementations implicitly register | ||
| 821 | using the same | ||
| 822 | .Fa nid | ||
| 823 | index. | ||
| 824 | .Pp | ||
| 825 | When a default | ||
| 826 | .Vt ENGINE | ||
| 827 | is requested for a given abstraction/algorithm/mode, (e.g. when | ||
| 828 | calling | ||
| 829 | .Fn RSA_new_method NULL ) , | ||
| 830 | a "get_default" call will be made to the | ||
| 831 | .Nm engine | ||
| 832 | subsystem to process the corresponding state table and return | ||
| 833 | a functional reference to an initialised | ||
| 834 | .Vt ENGINE | ||
| 835 | whose implementation should be used. | ||
| 836 | If no | ||
| 837 | .Vt ENGINE | ||
| 838 | should (or can) be used, it will return | ||
| 839 | .Dv NULL | ||
| 840 | and the caller will operate with a | ||
| 841 | .Dv NULL | ||
| 842 | .Vt ENGINE | ||
| 843 | handle. | ||
| 844 | This usually equates to using the conventional software implementation. | ||
| 845 | In the latter case, OpenSSL will from then on behave the way it used to | ||
| 846 | before the | ||
| 847 | .Nm engine | ||
| 848 | API existed. | ||
| 849 | .Pp | ||
| 850 | Each state table has a flag to note whether it has processed this | ||
| 851 | "get_default" query since the table was last modified, because to | ||
| 852 | process this question it must iterate across all the registered | ||
| 853 | .Vt ENGINE Ns s | ||
| 854 | in the table trying to initialise each of them in turn, in case one of | ||
| 855 | them is operational. | ||
| 856 | If it returns a functional reference to an | ||
| 857 | .Vt ENGINE , | ||
| 858 | it will also cache another reference to speed up processing future | ||
| 859 | queries (without needing to iterate across the table). | ||
| 860 | Likewise, it will cache a | ||
| 861 | .Dv NULL | ||
| 862 | response if no | ||
| 863 | .Vt ENGINE | ||
| 864 | was available so that future queries won't repeat the same iteration | ||
| 865 | unless the state table changes. | ||
| 866 | This behaviour can also be changed; if the | ||
| 867 | .Dv ENGINE_TABLE_FLAG_NOINIT | ||
| 868 | flag is set (using | ||
| 869 | .Fn ENGINE_set_table_flags ) , | ||
| 870 | no attempted initialisations will take place, instead the only way for | ||
| 871 | the state table to return a | ||
| 872 | .Pf non- Dv NULL | ||
| 873 | .Vt ENGINE | ||
| 874 | to the "get_default" query will be if one is expressly set in the table. | ||
| 875 | For example, | ||
| 876 | .Fn ENGINE_set_default_RSA | ||
| 877 | does the same job as | ||
| 878 | .Fn ENGINE_register_RSA | ||
| 879 | except that it also sets the state table's cached response for the | ||
| 880 | "get_default" query. | ||
| 881 | In the case of abstractions like | ||
| 882 | .Vt EVP_CIPHER , | ||
| 883 | where implementations are indexed by | ||
| 884 | .Fa nid , | ||
| 885 | these flags and cached-responses are distinct for each | ||
| 886 | .Fa nid | ||
| 887 | value. | ||
| 888 | .Ss Application requirements | 430 | .Ss Application requirements |
| 889 | This section will explain the basic things an application programmer | 431 | This section will explain the basic things an application programmer |
| 890 | should support to make the most useful elements of the | 432 | should support to make the most useful elements of the |
| @@ -1029,7 +571,7 @@ For example, the next time OpenSSL tries to set up an RSA key, any bundled | |||
| 1029 | that implement | 571 | that implement |
| 1030 | .Vt RSA_METHOD | 572 | .Vt RSA_METHOD |
| 1031 | will be passed to | 573 | will be passed to |
| 1032 | .Fn ENGINE_init | 574 | .Xr ENGINE_init 3 |
| 1033 | and if any of those succeed, that | 575 | and if any of those succeed, that |
| 1034 | .Vt ENGINE | 576 | .Vt ENGINE |
| 1035 | will be set as the default for RSA use from then on. | 577 | will be set as the default for RSA use from then on. |
| @@ -1074,11 +616,11 @@ This class of commands typically needs to be passed to an | |||
| 1074 | .Vt ENGINE | 616 | .Vt ENGINE |
| 1075 | .Sy before | 617 | .Sy before |
| 1076 | attempting to initialise it, i.e. before calling | 618 | attempting to initialise it, i.e. before calling |
| 1077 | .Fn ENGINE_init . | 619 | .Xr ENGINE_init 3 . |
| 1078 | The other class of commands consist of settings or operations that tweak | 620 | The other class of commands consist of settings or operations that tweak |
| 1079 | certain behaviour or cause certain operations to take place, and these | 621 | certain behaviour or cause certain operations to take place, and these |
| 1080 | commands may work either before or after | 622 | commands may work either before or after |
| 1081 | .Fn ENGINE_init , | 623 | .Xr ENGINE_init 3 , |
| 1082 | or in some cases both. | 624 | or in some cases both. |
| 1083 | .Vt ENGINE | 625 | .Vt ENGINE |
| 1084 | implementations should provide indications of this in the descriptions | 626 | implementations should provide indications of this in the descriptions |
| @@ -1295,55 +837,22 @@ to see if they implement "FOO_GET_VENDOR_LOGO_GIF" - and | |||
| 1295 | could therefore decide whether or not to support this "foo"-specific | 837 | could therefore decide whether or not to support this "foo"-specific |
| 1296 | extension). | 838 | extension). |
| 1297 | .Sh RETURN VALUES | 839 | .Sh RETURN VALUES |
| 1298 | .Fn ENGINE_get_first , | ||
| 1299 | .Fn ENGINE_get_last , | ||
| 1300 | .Fn ENGINE_get_next , | ||
| 1301 | .Fn ENGINE_get_prev , | ||
| 1302 | .Fn ENGINE_by_id , | ||
| 1303 | .Fn ENGINE_get_cipher_engine , | 840 | .Fn ENGINE_get_cipher_engine , |
| 1304 | .Fn ENGINE_get_digest_engine , | 841 | .Fn ENGINE_get_digest_engine , |
| 1305 | .Fn ENGINE_new , | 842 | and |
| 1306 | and all | 843 | .Fn ENGINE_new |
| 1307 | .Fn ENGINE_get_default_* | 844 | return a valid |
| 1308 | functions return a valid | ||
| 1309 | .Vt ENGINE | 845 | .Vt ENGINE |
| 1310 | structure or | 846 | structure or |
| 1311 | .Dv NULL | 847 | .Dv NULL |
| 1312 | if an error occurred. | 848 | if an error occurred. |
| 1313 | .Pp | 849 | .Pp |
| 1314 | .Fn ENGINE_add , | ||
| 1315 | .Fn ENGINE_remove , | ||
| 1316 | .Fn ENGINE_init , | ||
| 1317 | .Fn ENGINE_finish , | ||
| 1318 | .Fn ENGINE_ctrl_cmd , | ||
| 1319 | .Fn ENGINE_ctrl_cmd_string , | ||
| 1320 | .Fn ENGINE_free , | 850 | .Fn ENGINE_free , |
| 1321 | .Fn ENGINE_up_ref , | 851 | .Fn ENGINE_up_ref , |
| 1322 | and all | 852 | and all |
| 1323 | .Fn ENGINE_set_* | 853 | .Fn ENGINE_set_* |
| 1324 | and | ||
| 1325 | .Fn ENGINE_register_* | ||
| 1326 | functions return 1 on success or 0 on error. | 854 | functions return 1 on success or 0 on error. |
| 1327 | .Pp | 855 | .Pp |
| 1328 | .Fn ENGINE_get_table_flags | ||
| 1329 | returns an unsigned integer value representing the global table | ||
| 1330 | flags which are used to control the registration behaviour of | ||
| 1331 | .Vt ENGINE | ||
| 1332 | implementations. | ||
| 1333 | .Pp | ||
| 1334 | For | ||
| 1335 | .Fn ENGINE_ctrl , | ||
| 1336 | positive return values indicate success and negative return values | ||
| 1337 | indicate failure. | ||
| 1338 | The meaning of a zero return value depends on the particular | ||
| 1339 | .Fa cmd | ||
| 1340 | and may indicate both success and failure, which is pathetic. | ||
| 1341 | .Pp | ||
| 1342 | .Fn ENGINE_cmd_is_executable | ||
| 1343 | returns 1 if | ||
| 1344 | .Fa cmd | ||
| 1345 | is executable or 0 otherwise. | ||
| 1346 | .Pp | ||
| 1347 | .Fn ENGINE_get_id | 856 | .Fn ENGINE_get_id |
| 1348 | and | 857 | and |
| 1349 | .Fn ENGINE_get_name | 858 | .Fn ENGINE_get_name |
| @@ -1361,9 +870,6 @@ and | |||
| 1361 | return a method structure for the respective algorithm. | 870 | return a method structure for the respective algorithm. |
| 1362 | .Pp | 871 | .Pp |
| 1363 | .Fn ENGINE_get_destroy_function , | 872 | .Fn ENGINE_get_destroy_function , |
| 1364 | .Fn ENGINE_get_init_function , | ||
| 1365 | .Fn ENGINE_get_finish_function , | ||
| 1366 | .Fn ENGINE_get_ctrl_function , | ||
| 1367 | .Fn ENGINE_get_load_privkey_function , | 873 | .Fn ENGINE_get_load_privkey_function , |
| 1368 | .Fn ENGINE_get_load_pubkey_function , | 874 | .Fn ENGINE_get_load_pubkey_function , |
| 1369 | .Fn ENGINE_get_ciphers , | 875 | .Fn ENGINE_get_ciphers , |
| @@ -1390,13 +896,6 @@ returns an integer representing the flags | |||
| 1390 | which are used to control various behaviours of an | 896 | which are used to control various behaviours of an |
| 1391 | .Vt ENGINE . | 897 | .Vt ENGINE . |
| 1392 | .Pp | 898 | .Pp |
| 1393 | .Fn ENGINE_get_cmd_defns | ||
| 1394 | returns an | ||
| 1395 | .Vt ENGINE_CMD_DEFN | ||
| 1396 | structure or | ||
| 1397 | .Dv NULL | ||
| 1398 | if none is set. | ||
| 1399 | .Pp | ||
| 1400 | .Fn ENGINE_load_private_key | 899 | .Fn ENGINE_load_private_key |
| 1401 | and | 900 | and |
| 1402 | .Fn ENGINE_load_public_key | 901 | .Fn ENGINE_load_public_key |
