summaryrefslogtreecommitdiffstats
path: root/2.9.2/fix-engine
blob: 04dca45f5f1eaf8f1dfdb84945f8cf5f1f052985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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",
     ]