|
27 | 27 | static const unsigned int ENGINE_METHOD_RAND;
|
28 | 28 |
|
29 | 29 | static const int ENGINE_R_CONFLICTING_ENGINE_ID;
|
| 30 | +static const long Cryptography_HAS_ENGINE; |
30 | 31 | """
|
31 | 32 |
|
32 | 33 | FUNCTIONS = """
|
|
69 | 70 | """
|
70 | 71 |
|
71 | 72 | CUSTOMIZATIONS = """
|
| 73 | +#ifdef OPENSSL_NO_ENGINE |
| 74 | +static const long Cryptography_HAS_ENGINE = 0; |
| 75 | +typedef int (*ENGINE_GEN_INT_FUNC_PTR)(ENGINE *); |
| 76 | +typedef void *ENGINE_CTRL_FUNC_PTR; |
| 77 | +typedef void *ENGINE_LOAD_KEY_PTR; |
| 78 | +typedef void *ENGINE_CIPHERS_PTR; |
| 79 | +typedef void *ENGINE_DIGESTS_PTR; |
| 80 | +typedef struct ENGINE_CMD_DEFN_st { |
| 81 | + unsigned int cmd_num; |
| 82 | + const char *cmd_name; |
| 83 | + const char *cmd_desc; |
| 84 | + unsigned int cmd_flags; |
| 85 | +} ENGINE_CMD_DEFN; |
| 86 | +
|
| 87 | +/* This section is so osrandom_engine.c can successfully compile even |
| 88 | + when engine support is disabled */ |
| 89 | +#define ENGINE_CMD_BASE 0 |
| 90 | +#define ENGINE_CMD_FLAG_NO_INPUT 0 |
| 91 | +#define ENGINE_F_ENGINE_CTRL 0 |
| 92 | +#define ENGINE_R_INVALID_ARGUMENT 0 |
| 93 | +#define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 0 |
| 94 | +int (*ENGINE_set_cmd_defns)(ENGINE *, const ENGINE_CMD_DEFN *) = NULL; |
| 95 | +
|
| 96 | +static const unsigned int ENGINE_METHOD_RAND = 0; |
| 97 | +static const int ENGINE_R_CONFLICTING_ENGINE_ID = 0; |
| 98 | +
|
| 99 | +ENGINE *(*ENGINE_get_first)(void) = NULL; |
| 100 | +ENGINE *(*ENGINE_get_last)(void) = NULL; |
| 101 | +int (*ENGINE_add)(ENGINE *) = NULL; |
| 102 | +int (*ENGINE_remove)(ENGINE *) = NULL; |
| 103 | +ENGINE *(*ENGINE_by_id)(const char *) = NULL; |
| 104 | +int (*ENGINE_init)(ENGINE *) = NULL; |
| 105 | +int (*ENGINE_finish)(ENGINE *) = NULL; |
| 106 | +void (*ENGINE_load_builtin_engines)(void) = NULL; |
| 107 | +ENGINE *(*ENGINE_get_default_RAND)(void) = NULL; |
| 108 | +int (*ENGINE_set_default_RAND)(ENGINE *) = NULL; |
| 109 | +int (*ENGINE_register_RAND)(ENGINE *) = NULL; |
| 110 | +void (*ENGINE_unregister_RAND)(ENGINE *) = NULL; |
| 111 | +void (*ENGINE_register_all_RAND)(void) = NULL; |
| 112 | +int (*ENGINE_ctrl)(ENGINE *, int, long, void *, void (*)(void)) = NULL; |
| 113 | +int (*ENGINE_ctrl_cmd)(ENGINE *, const char *, long, void *, |
| 114 | + void (*)(void), int) = NULL; |
| 115 | +int (*ENGINE_ctrl_cmd_string)(ENGINE *, const char *, const char *, |
| 116 | + int) = NULL; |
| 117 | +
|
| 118 | +ENGINE *(*ENGINE_new)(void) = NULL; |
| 119 | +int (*ENGINE_free)(ENGINE *) = NULL; |
| 120 | +int (*ENGINE_up_ref)(ENGINE *) = NULL; |
| 121 | +int (*ENGINE_set_id)(ENGINE *, const char *) = NULL; |
| 122 | +int (*ENGINE_set_name)(ENGINE *, const char *) = NULL; |
| 123 | +int (*ENGINE_set_RAND)(ENGINE *, const RAND_METHOD *) = NULL; |
| 124 | +int (*ENGINE_set_destroy_function)(ENGINE *, ENGINE_GEN_INT_FUNC_PTR) = NULL; |
| 125 | +int (*ENGINE_set_init_function)(ENGINE *, ENGINE_GEN_INT_FUNC_PTR) = NULL; |
| 126 | +int (*ENGINE_set_finish_function)(ENGINE *, ENGINE_GEN_INT_FUNC_PTR) = NULL; |
| 127 | +int (*ENGINE_set_ctrl_function)(ENGINE *, ENGINE_CTRL_FUNC_PTR) = NULL; |
| 128 | +const char *(*ENGINE_get_id)(const ENGINE *) = NULL; |
| 129 | +const char *(*ENGINE_get_name)(const ENGINE *) = NULL; |
| 130 | +const RAND_METHOD *(*ENGINE_get_RAND)(const ENGINE *) = NULL; |
| 131 | +
|
| 132 | +void (*ENGINE_add_conf_module)(void) = NULL; |
| 133 | +/* these became macros in 1.1.0 */ |
| 134 | +void (*ENGINE_load_openssl)(void) = NULL; |
| 135 | +void (*ENGINE_load_dynamic)(void) = NULL; |
| 136 | +void (*ENGINE_cleanup)(void) = NULL; |
| 137 | +#else |
| 138 | +static const long Cryptography_HAS_ENGINE = 1; |
| 139 | +#endif |
72 | 140 | """
|
0 commit comments