summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/engine_stubs.c
diff options
context:
space:
mode:
authortb <>2023-07-21 09:04:23 +0000
committertb <>2023-07-21 09:04:23 +0000
commitf3f431c8f6134c5d325ede30963e2f1edd9a0718 (patch)
treea06a9f51ed23a061b5e6a00600a42d86ad37ce11 /src/lib/libcrypto/engine/engine_stubs.c
parent0fa0e5b768255277d5110ebe72faab0818b80b86 (diff)
downloadopenbsd-f3f431c8f6134c5d325ede30963e2f1edd9a0718.tar.gz
openbsd-f3f431c8f6134c5d325ede30963e2f1edd9a0718.tar.bz2
openbsd-f3f431c8f6134c5d325ede30963e2f1edd9a0718.zip
Provide a bunch of always failing ENGINE API
This commit adds a few symbols under OPENSSL_NO_ENGINE. They will be used after the main ENGINE code is disabled in the next bump. The ecosystem is mostly prepared for dealing with a libcrypto compiled with OPENSSL_NO_ENGINE. There are a few stragglers like M2Crypto, dovecot and the latest apr-util release (fixed in their development branch). To avoid intrusive patching in these ports, we need to keep a bunch of ENGINE symbols around despite adding OPENSSL_NO_ENGINE. This of course meant patching some other ports, but that was way easier. ok jsing
Diffstat (limited to 'src/lib/libcrypto/engine/engine_stubs.c')
-rw-r--r--src/lib/libcrypto/engine/engine_stubs.c125
1 files changed, 125 insertions, 0 deletions
diff --git a/src/lib/libcrypto/engine/engine_stubs.c b/src/lib/libcrypto/engine/engine_stubs.c
new file mode 100644
index 0000000000..3621da80ef
--- /dev/null
+++ b/src/lib/libcrypto/engine/engine_stubs.c
@@ -0,0 +1,125 @@
1/* $OpenBSD: engine_stubs.c,v 1.1 2023/07/21 09:04:23 tb Exp $ */
2
3/*
4 * Written by Theo Buehler. Public domain.
5 */
6
7#include <openssl/engine.h>
8
9#ifdef OPENSSL_NO_ENGINE
10
11void
12ENGINE_load_builtin_engines(void)
13{
14}
15
16void
17ENGINE_load_dynamic(void)
18{
19}
20
21void
22ENGINE_load_openssl(void)
23{
24}
25
26int
27ENGINE_register_all_complete(void)
28{
29 return 0;
30}
31
32void
33ENGINE_cleanup(void)
34{
35}
36
37ENGINE *
38ENGINE_new(void)
39{
40 return NULL;
41}
42
43int
44ENGINE_free(ENGINE *engine)
45{
46 return 0;
47}
48
49int
50ENGINE_init(ENGINE *engine)
51{
52 return 0;
53}
54
55int
56ENGINE_finish(ENGINE *engine)
57{
58 return 0;
59}
60
61ENGINE *
62ENGINE_by_id(const char *id)
63{
64 return NULL;
65}
66
67const char *
68ENGINE_get_id(const ENGINE *engine)
69{
70 return "";
71}
72
73const char *
74ENGINE_get_name(const ENGINE *engine)
75{
76 return "";
77}
78
79int
80ENGINE_set_default(ENGINE *engine, unsigned int flags)
81{
82 return 0;
83}
84
85ENGINE *
86ENGINE_get_default_RSA(void)
87{
88 return NULL;
89}
90
91int
92ENGINE_set_default_RSA(ENGINE *engine)
93{
94 return 0;
95}
96
97int
98ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, long i, void *p,
99 void (*f)(void), int cmd_optional)
100{
101 return 0;
102}
103
104int
105ENGINE_ctrl_cmd_string(ENGINE *engine, const char *cmd, const char *arg,
106 int cmd_optional)
107{
108 return 0;
109}
110
111EVP_PKEY *
112ENGINE_load_private_key(ENGINE *engine, const char *key_id,
113 UI_METHOD *ui_method, void *callback_data)
114{
115 return NULL;
116}
117
118EVP_PKEY *
119ENGINE_load_public_key(ENGINE *engine, const char *key_id,
120 UI_METHOD *ui_method, void *callback_data)
121{
122 return NULL;
123}
124
125#endif