xref: /openbsd-src/lib/libcrypto/man/ENGINE_new.3 (revision 432b8f8f0725d8b782d9e3ba1ab377e911c61828)
1*432b8f8fStb.\" $OpenBSD: ENGINE_new.3,v 1.10 2023/11/19 21:13:47 tb Exp $
24e758b21Sschwarze.\"
398c78a16Stb.\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
44e758b21Sschwarze.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
54e758b21Sschwarze.\"
64e758b21Sschwarze.\" Permission to use, copy, modify, and distribute this software for any
74e758b21Sschwarze.\" purpose with or without fee is hereby granted, provided that the above
84e758b21Sschwarze.\" copyright notice and this permission notice appear in all copies.
94e758b21Sschwarze.\"
104e758b21Sschwarze.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
114e758b21Sschwarze.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
124e758b21Sschwarze.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
134e758b21Sschwarze.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
144e758b21Sschwarze.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
154e758b21Sschwarze.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
164e758b21Sschwarze.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
174e758b21Sschwarze.\"
1898c78a16Stb.Dd $Mdocdate: November 19 2023 $
194e758b21Sschwarze.Dt ENGINE_NEW 3
204e758b21Sschwarze.Os
214e758b21Sschwarze.Sh NAME
224e758b21Sschwarze.Nm ENGINE_new ,
234e758b21Sschwarze.Nm ENGINE_free ,
2498c78a16Stb.Nm ENGINE_init ,
2598c78a16Stb.Nm ENGINE_finish ,
26cad1d3f4Stb.Nm ENGINE_ctrl_cmd ,
27cad1d3f4Stb.Nm ENGINE_ctrl_cmd_string ,
2898c78a16Stb.Nm ENGINE_by_id ,
2998c78a16Stb.Nm ENGINE_get_id ,
3098c78a16Stb.Nm ENGINE_get_name ,
3198c78a16Stb.Nm ENGINE_set_default ,
3298c78a16Stb.Nm ENGINE_get_default_RSA ,
3398c78a16Stb.Nm ENGINE_set_default_RSA ,
3498c78a16Stb.Nm ENGINE_load_private_key ,
3598c78a16Stb.Nm ENGINE_load_public_key ,
3698c78a16Stb.Nm ENGINE_load_builtin_engines ,
3798c78a16Stb.Nm ENGINE_load_dynamic ,
3898c78a16Stb.Nm ENGINE_load_openssl ,
39cad1d3f4Stb.Nm ENGINE_register_all_complete ,
40cad1d3f4Stb.Nm ENGINE_cleanup
4198c78a16Stb.Nd ENGINE stub functions
424e758b21Sschwarze.Sh SYNOPSIS
434e758b21Sschwarze.In openssl/engine.h
444e758b21Sschwarze.Ft ENGINE *
454e758b21Sschwarze.Fn ENGINE_new void
464e758b21Sschwarze.Ft int
474e758b21Sschwarze.Fo ENGINE_free
4898c78a16Stb.Fa "ENGINE *engine"
494e758b21Sschwarze.Fc
504e758b21Sschwarze.Ft int
5198c78a16Stb.Fn ENGINE_init "ENGINE *engine"
5298c78a16Stb.Ft int
5398c78a16Stb.Fn ENGINE_finish "ENGINE *engine"
54cad1d3f4Stb.Ft int
55cad1d3f4Stb.Fo ENGINE_ctrl_cmd
56cad1d3f4Stb.Fa "ENGINE *engine"
57cad1d3f4Stb.Fa "const char *cmd_name"
58cad1d3f4Stb.Fa "long i"
59cad1d3f4Stb.Fa "void *p"
60cad1d3f4Stb.Fa "void (*f)(void)"
61cad1d3f4Stb.Fa "int cmd_optional"
62cad1d3f4Stb.Fc
63cad1d3f4Stb.Ft int
64cad1d3f4Stb.Fo ENGINE_ctrl_cmd_string
65cad1d3f4Stb.Fa "ENGINE *engine"
66cad1d3f4Stb.Fa "const char *cmd_name"
67cad1d3f4Stb.Fa "const char *arg"
68cad1d3f4Stb.Fa "int cmd_optional"
69cad1d3f4Stb.Fc
7098c78a16Stb.Ft ENGINE *
7198c78a16Stb.Fn ENGINE_by_id "const char *id"
7298c78a16Stb.Ft const char *
7398c78a16Stb.Fn ENGINE_get_id "const ENGINE *engine"
7498c78a16Stb.Ft const char *
7598c78a16Stb.Fn ENGINE_get_name "const ENGINE *engine"
7698c78a16Stb.Ft int
7798c78a16Stb.Fn ENGINE_set_default "ENGINE *engine" "unsigned int flags"
7898c78a16Stb.Ft ENGINE *
7998c78a16Stb.Fn ENGINE_get_default_RSA "ENGINE *engine"
8098c78a16Stb.Ft int
8198c78a16Stb.Fn ENGINE_set_default_RSA "ENGINE *engine"
8298c78a16Stb.Ft EVP_PKEY *
8398c78a16Stb.Fo ENGINE_load_private_key
8498c78a16Stb.Fa "ENGINE *engine"
8598c78a16Stb.Fa "const char *key_id"
8698c78a16Stb.Fa "UI_METHOD *ui_method"
8798c78a16Stb.Fa "void *callback_data"
884e758b21Sschwarze.Fc
8998c78a16Stb.Ft EVP_PKEY *
9098c78a16Stb.Fo ENGINE_load_public_key
9198c78a16Stb.Fa "ENGINE *engine"
9298c78a16Stb.Fa "const char *key_id"
9398c78a16Stb.Fa "UI_METHOD *ui_method"
9498c78a16Stb.Fa "void *callback_data"
954e758b21Sschwarze.Fc
9698c78a16Stb.Ft void
9798c78a16Stb.Fn ENGINE_load_builtin_engines "void"
9898c78a16Stb.Ft void
9998c78a16Stb.Fn ENGINE_load_dynamic "void"
10098c78a16Stb.Ft void
10198c78a16Stb.Fn ENGINE_load_openssl "void"
10298c78a16Stb.Ft int
10398c78a16Stb.Fn ENGINE_register_all_complete "void"
104cad1d3f4Stb.Ft void
105cad1d3f4Stb.Fn ENGINE_cleanup "void"
1064e758b21Sschwarze.Sh DESCRIPTION
107ff941badSschwarze.Vt ENGINE
10898c78a16Stbobjects used to provide alternative implementations of
10998c78a16Stbcryptographic algorithms, for example using specialized hardware.
11098c78a16StbLibreSSL no longer supports this feature.
111ff941badSschwarze.Pp
11298c78a16StbAll functions in this manual ignore all their arguments and
11398c78a16Stbdo nothing except return failure if possible.
11498c78a16StbThey are provided only to avoid patching software that expects
115*432b8f8fStb.Vt ENGINE
116*432b8f8fStbsupport to be available.
1174e758b21Sschwarze.Sh RETURN VALUES
11898c78a16Stb.Fn ENGINE_new ,
11998c78a16Stb.Fn ENGINE_by_id ,
12098c78a16Stb.Fn ENGINE_get_default_RSA ,
12198c78a16Stb.Fn ENGINE_load_private_key ,
1224e758b21Sschwarzeand
12309e81b83Stb.Fn ENGINE_load_public_key
12498c78a16Stbalways return
12598c78a16Stb.Dv NULL .
1264e758b21Sschwarze.Pp
12798c78a16Stb.Fn ENGINE_free ,
12898c78a16Stb.Fn ENGINE_init ,
12998c78a16Stb.Fn ENGINE_finish ,
130cad1d3f4Stb.Fn ENGINE_ctrl_cmd ,
131cad1d3f4Stb.Fn ENGINE_ctrl_cmd_string ,
13298c78a16Stb.Fn ENGINE_set_default ,
13398c78a16Stb.Fn ENGINE_set_default_RSA ,
13498c78a16Stband
13598c78a16Stb.Fn ENGINE_register_all_complete
13698c78a16Stbalways return 0.
13798c78a16Stb.Pp
13898c78a16Stb.Fn ENGINE_get_id
13998c78a16Stband
14098c78a16Stb.Fn ENGINE_get_name
14198c78a16Stbalways return the constant empty string.
142bbd8ca52Sschwarze.Sh SEE ALSO
14398c78a16Stb.Xr crypto 3
144bbd8ca52Sschwarze.Sh HISTORY
14598c78a16Stb.Fn ENGINE_new ,
14698c78a16Stb.Fn ENGINE_free ,
14798c78a16Stb.Fn ENGINE_init ,
14898c78a16Stb.Fn ENGINE_finish ,
14998c78a16Stb.Fn ENGINE_by_id ,
15098c78a16Stb.Fn ENGINE_get_id ,
15198c78a16Stb.Fn ENGINE_get_name ,
15298c78a16Stb.Fn ENGINE_set_default ,
15398c78a16Stb.Fn ENGINE_get_default_RSA ,
15498c78a16Stb.Fn ENGINE_set_default_RSA ,
15598c78a16Stb.Fn ENGINE_load_private_key ,
156bbd8ca52Sschwarzeand
15798c78a16Stb.Fn ENGINE_load_public_key
15898c78a16Stbfirst appeared in OpenSSL 0.9.7
15998c78a16Stband have been available since
1602b84715cStb.Ox 2.9 .
161bbd8ca52Sschwarze.Pp
162cad1d3f4Stb.Fn ENGINE_ctrl_cmd ,
163cad1d3f4Stb.Fn ENGINE_ctrl_cmd_string ,
16498c78a16Stb.Fn ENGINE_load_builtin_engines ,
16598c78a16Stb.Fn ENGINE_load_openssl ,
166cad1d3f4Stb.Fn ENGINE_register_all_complete ,
167bbd8ca52Sschwarzeand
168cad1d3f4Stb.Fn ENGINE_cleanup
16998c78a16Stbfirst appeared in OpenSSL 0.9.7
17098c78a16Stband have been available since
171bbd8ca52Sschwarze.Ox 3.4 .
17298c78a16Stb.Pp
17398c78a16StbAll these functions were turned into stubs in
17498c78a16Stb.Ox 7.4 .
175