aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl/callbacks.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2017-01-18 08:02:38 +0100
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-01-18 15:02:38 +0800
commitd078e546e2ebfaa37ebe92c446ff437183312530 (patch)
treecf2cd95dd05c3751dc1310ee93da6a1183e29f25 /src/_cffi_src/openssl/callbacks.py
parent1bab7bcf7ba08fc9534670c27a91076d2874ec76 (diff)
downloadcryptography-d078e546e2ebfaa37ebe92c446ff437183312530.tar.gz
cryptography-d078e546e2ebfaa37ebe92c446ff437183312530.tar.bz2
cryptography-d078e546e2ebfaa37ebe92c446ff437183312530.zip
Use static callbacks with Python 3.x again (#3350)
* Use static callbacks with Python 3.x again Static callbacks were disabled for Python 3.5+ to work around an issue with subinterpreters, locking callbacks and osrandom engine. Locking callback and osrandom engine were replaced with a C implementations in version 1.6 and 1.7. https://github.com/pyca/cryptography/issues/2970 Closes: #3348 Signed-off-by: Christian Heimes <christian@python.org> * remove unused import
Diffstat (limited to 'src/_cffi_src/openssl/callbacks.py')
-rw-r--r--src/_cffi_src/openssl/callbacks.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py
index 4a6b4d37..0194d2a5 100644
--- a/src/_cffi_src/openssl/callbacks.py
+++ b/src/_cffi_src/openssl/callbacks.py
@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function
-import sys
-
import cffi
INCLUDES = """
@@ -50,9 +48,8 @@ CUSTOMIZATIONS = """
static const long Cryptography_STATIC_CALLBACKS = 1;
"""
-if cffi.__version_info__ < (1, 4, 0) or sys.version_info >= (3, 5):
+if cffi.__version_info__ < (1, 4, 0):
# backwards compatibility for old cffi version on PyPy
- # and Python >=3.5 (https://github.com/pyca/cryptography/issues/2970)
TYPES = "static const long Cryptography_STATIC_CALLBACKS;"
CUSTOMIZATIONS = """static const long Cryptography_STATIC_CALLBACKS = 0;
"""