From 6f711102f5549cb367bbd6c6e2222dc3d8847bbc Mon Sep 17 00:00:00 2001 From: Steven McDonald Date: Wed, 18 Feb 2015 16:18:29 +1100 Subject: Define COMP_METHOD when building against LibreSSL LibreSSL no longer uses compression in ssl.h, so the case that was formerly activated by defining OPENSSL_NO_COMP is now the default, and COMP_METHOD isn't defined (it's defined in comp.h, but that's no longer included by ssl.h). In order to make all the type definitions here line up with what's actually in LibreSSL's ssl.h, define COMP_METHOD as void. This definition is still compatible with the later type declaration in ssl.py: typedef ... COMP_METHOD; --- src/cryptography/hazmat/bindings/openssl/ssl.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/ssl.py b/src/cryptography/hazmat/bindings/openssl/ssl.py index bf627139..2bbe4043 100644 --- a/src/cryptography/hazmat/bindings/openssl/ssl.py +++ b/src/cryptography/hazmat/bindings/openssl/ssl.py @@ -7,6 +7,14 @@ 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; """ -- cgit v1.2.3