diff --git a/src/_cffi_src/openssl/engine.py b/src/_cffi_src/openssl/engine.py index fa503a26..1cc61e92 100644 --- a/src/_cffi_src/openssl/engine.py +++ b/src/_cffi_src/openssl/engine.py @@ -10,6 +10,7 @@ INCLUDES = """ TYPES = """ typedef ... ENGINE; +typedef ... UI_METHOD; static const long Cryptography_HAS_ENGINE; """ @@ -24,6 +25,8 @@ void ENGINE_unregister_RAND(ENGINE *); int ENGINE_ctrl_cmd(ENGINE *, const char *, long, void *, void (*)(void), int); int ENGINE_free(ENGINE *); const char *ENGINE_get_name(const ENGINE *); +EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, + UI_METHOD *ui_method, void *callback_data); """ @@ -44,6 +47,10 @@ int (*ENGINE_free)(ENGINE *) = NULL; const char *(*ENGINE_get_id)(const ENGINE *) = NULL; const char *(*ENGINE_get_name)(const ENGINE *) = NULL; +EVP_PKEY *(*ENGINE_load_private_key(ENGINE *e, const char *key_id, + UI_METHOD *ui_method, void *callback_data)) = NULL; + + #else static const long Cryptography_HAS_ENGINE = 1; #endif diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py index a293fb09..38efdb26 100644 --- a/src/cryptography/hazmat/bindings/openssl/_conditional.py +++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py @@ -355,6 +355,7 @@ def cryptography_has_engine(): "ENGINE_ctrl_cmd", "ENGINE_free", "ENGINE_get_name", + "ENGINE_load_private_key", "Cryptography_add_osrandom_engine", ]