aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-08-24 08:00:10 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-10-21 23:00:24 -0500
commit9837cb15b84fea92ffce3306d14160a8c11b1c65 (patch)
tree532610680f8894875ad78108bbf2d2ada1793509 /src/_cffi_src/openssl
parent2d79836e9dbafd217f2febb61b964157600dc9f5 (diff)
downloadcryptography-9837cb15b84fea92ffce3306d14160a8c11b1c65.tar.gz
cryptography-9837cb15b84fea92ffce3306d14160a8c11b1c65.tar.bz2
cryptography-9837cb15b84fea92ffce3306d14160a8c11b1c65.zip
make engine addition idempotent
Threading issues keep cropping up. ENGINE_add already acquires a lock at the C layer via CRYPTO_w_lock (provided you have registered the locking callbacks) so let's try to use that. As part of this we'll try to init the openssl locks, but of course there's potentially a race there as well. Clearly this isn't the real fix but it might improve the situation while we try to determine what to do.
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r--src/_cffi_src/openssl/engine.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/engine.py b/src/_cffi_src/openssl/engine.py
index 011f6692..60c6f3e2 100644
--- a/src/_cffi_src/openssl/engine.py
+++ b/src/_cffi_src/openssl/engine.py
@@ -44,6 +44,8 @@ static const unsigned int ENGINE_METHOD_DIGESTS;
static const unsigned int ENGINE_METHOD_STORE;
static const unsigned int ENGINE_METHOD_ALL;
static const unsigned int ENGINE_METHOD_NONE;
+
+static const int ENGINE_R_CONFLICTING_ENGINE_ID;
"""
FUNCTIONS = """