aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-28 23:45:42 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-07-29 14:45:42 +0800
commit6e9e489fd80424811d1b228d64f3b1b3d23de2a8 (patch)
tree681f6b8fe62d584d30d5433d65a4876f0e6e974b /src/_cffi_src/openssl
parent11997b1947837be4cd24a1edfeabad0cdd800a45 (diff)
downloadcryptography-6e9e489fd80424811d1b228d64f3b1b3d23de2a8.tar.gz
cryptography-6e9e489fd80424811d1b228d64f3b1b3d23de2a8.tar.bz2
cryptography-6e9e489fd80424811d1b228d64f3b1b3d23de2a8.zip
disable static callbacks on Python 3.5 (refs #2970) (#3063)
Diffstat (limited to 'src/_cffi_src/openssl')
-rw-r--r--src/_cffi_src/openssl/callbacks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py
index 3e4ef572..5ae89b18 100644
--- a/src/_cffi_src/openssl/callbacks.py
+++ b/src/_cffi_src/openssl/callbacks.py
@@ -4,6 +4,8 @@
from __future__ import absolute_import, division, print_function
+import sys
+
import cffi
INCLUDES = """
@@ -44,7 +46,8 @@ CUSTOMIZATIONS = """
static const long Cryptography_STATIC_CALLBACKS = 1;
"""
-if cffi.__version_info__ < (1, 4, 0):
+if cffi.__version_info__ < (1, 4, 0) or sys.version_info >= (3, 5):
# 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;"