diff options
| author | tb <> | 2023-07-21 09:04:23 +0000 |
|---|---|---|
| committer | tb <> | 2023-07-21 09:04:23 +0000 |
| commit | 6fcc6301cbb6ea5d47209442358f4af309d05661 (patch) | |
| tree | a06a9f51ed23a061b5e6a00600a42d86ad37ce11 /src/lib/libcrypto/engine/engine_stubs.c | |
| parent | 500c0a920f08fe601ee280579eec5b7b8b093dfb (diff) | |
| download | openbsd-6fcc6301cbb6ea5d47209442358f4af309d05661.tar.gz openbsd-6fcc6301cbb6ea5d47209442358f4af309d05661.tar.bz2 openbsd-6fcc6301cbb6ea5d47209442358f4af309d05661.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.c | 125 |
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 | |||
| 11 | void | ||
| 12 | ENGINE_load_builtin_engines(void) | ||
| 13 | { | ||
| 14 | } | ||
| 15 | |||
| 16 | void | ||
| 17 | ENGINE_load_dynamic(void) | ||
| 18 | { | ||
| 19 | } | ||
| 20 | |||
| 21 | void | ||
| 22 | ENGINE_load_openssl(void) | ||
| 23 | { | ||
| 24 | } | ||
| 25 | |||
| 26 | int | ||
| 27 | ENGINE_register_all_complete(void) | ||
| 28 | { | ||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | |||
| 32 | void | ||
| 33 | ENGINE_cleanup(void) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | ENGINE * | ||
| 38 | ENGINE_new(void) | ||
| 39 | { | ||
| 40 | return NULL; | ||
| 41 | } | ||
| 42 | |||
| 43 | int | ||
| 44 | ENGINE_free(ENGINE *engine) | ||
| 45 | { | ||
| 46 | return 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | int | ||
| 50 | ENGINE_init(ENGINE *engine) | ||
| 51 | { | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | |||
| 55 | int | ||
| 56 | ENGINE_finish(ENGINE *engine) | ||
| 57 | { | ||
| 58 | return 0; | ||
| 59 | } | ||
| 60 | |||
| 61 | ENGINE * | ||
| 62 | ENGINE_by_id(const char *id) | ||
| 63 | { | ||
| 64 | return NULL; | ||
| 65 | } | ||
| 66 | |||
| 67 | const char * | ||
| 68 | ENGINE_get_id(const ENGINE *engine) | ||
| 69 | { | ||
| 70 | return ""; | ||
| 71 | } | ||
| 72 | |||
| 73 | const char * | ||
| 74 | ENGINE_get_name(const ENGINE *engine) | ||
| 75 | { | ||
| 76 | return ""; | ||
| 77 | } | ||
| 78 | |||
| 79 | int | ||
| 80 | ENGINE_set_default(ENGINE *engine, unsigned int flags) | ||
| 81 | { | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | ENGINE * | ||
| 86 | ENGINE_get_default_RSA(void) | ||
| 87 | { | ||
| 88 | return NULL; | ||
| 89 | } | ||
| 90 | |||
| 91 | int | ||
| 92 | ENGINE_set_default_RSA(ENGINE *engine) | ||
| 93 | { | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | |||
| 97 | int | ||
| 98 | ENGINE_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 | |||
| 104 | int | ||
| 105 | ENGINE_ctrl_cmd_string(ENGINE *engine, const char *cmd, const char *arg, | ||
| 106 | int cmd_optional) | ||
| 107 | { | ||
| 108 | return 0; | ||
| 109 | } | ||
| 110 | |||
| 111 | EVP_PKEY * | ||
| 112 | ENGINE_load_private_key(ENGINE *engine, const char *key_id, | ||
| 113 | UI_METHOD *ui_method, void *callback_data) | ||
| 114 | { | ||
| 115 | return NULL; | ||
| 116 | } | ||
| 117 | |||
| 118 | EVP_PKEY * | ||
| 119 | ENGINE_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 | ||
