From c965f0ad5b6cbb8920521fdb2ecb79e851af7d19 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 19 Feb 2015 13:55:34 -0600 Subject: move COMP_METHOD define and change to typedef for libre --- src/cryptography/hazmat/bindings/openssl/ssl.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') 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 -/* 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 = { -- cgit v1.2.3