aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-19 13:55:34 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-19 13:55:34 -0600
commitc965f0ad5b6cbb8920521fdb2ecb79e851af7d19 (patch)
treea076e69d8fe61d2420a51035c18a582f75540d5b /src
parent27e6b9c863d4d1c777205a3bfb850787b67f63d0 (diff)
downloadcryptography-c965f0ad5b6cbb8920521fdb2ecb79e851af7d19.tar.gz
cryptography-c965f0ad5b6cbb8920521fdb2ecb79e851af7d19.tar.bz2
cryptography-c965f0ad5b6cbb8920521fdb2ecb79e851af7d19.zip
move COMP_METHOD define and change to typedef for libre
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/bindings/openssl/ssl.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/ssl.py b/src/cryptography/hazmat/bindings/openssl/ssl.py
index 2bbe4043..1a6f1c20 100644
--- a/src/cryptography/hazmat/bindings/openssl/ssl.py
+++ b/src/cryptography/hazmat/bindings/openssl/ssl.py
@@ -7,14 +7,6 @@ from __future__ import absolute_import, division, print_function
INCLUDES = """
#include <openssl/ssl.h>
-/* LibreSSL has removed support for compression, and with it the
- * COMP_METHOD use in ssl.h. This is a hack to make the function types
- * in this code match those in ssl.h.
- */
-#ifdef LIBRESSL_VERSION_NUMBER
-#define COMP_METHOD void
-#endif
-
typedef STACK_OF(SSL_CIPHER) Cryptography_STACK_OF_SSL_CIPHER;
"""
@@ -552,6 +544,14 @@ static const long Cryptography_HAS_ALPN = 0;
#else
static const long Cryptography_HAS_ALPN = 1;
#endif
+/* LibreSSL has removed support for compression, and with it the
+ * COMP_METHOD use in ssl.h. This is a hack to make the function types
+ * in this code match those in ssl.h.
+ */
+#ifdef LIBRESSL_VERSION_NUMBER
+typedef void COMP_METHOD;
+#endif
+
"""
CONDITIONAL_NAMES = {