python-cryptography: fix compile issue with openssl 1.0.2h

this fixes:

error: 'SSLv2_method' redeclared as different kind of symbol
|  SSL_METHOD* (*SSLv2_method)(void) = NULL;

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Armin Kuster
2016-05-31 07:08:26 -07:00
committed by Martin Jansa
parent fb574eead5
commit 8ab04afbff
3 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
From f326e4a97cce6b9479560ce0c65ad18d54393f96 Mon Sep 17 00:00:00 2001
From: Cory Benfield <lukasaoz@gmail.com>
Date: Mon, 14 Dec 2015 15:37:46 +0000
Subject: [PATCH] Comment lingering SSLv2 symbol.
---
src/_cffi_src/openssl/ssl.py | 4 ++++
1 file changed, 4 insertions(+)
Index: cryptography-0.8.1/src/cryptography/hazmat/bindings/openssl/ssl.py
===================================================================
--- cryptography-0.8.1.orig/src/cryptography/hazmat/bindings/openssl/ssl.py
+++ cryptography-0.8.1/src/cryptography/hazmat/bindings/openssl/ssl.py
@@ -372,6 +372,11 @@ const long SSL_OP_LEGACY_SERVER_CONNECT
#else
static const long Cryptography_HAS_SECURE_RENEGOTIATION = 1;
#endif
+
+/* Cryptography now compiles out all SSLv2 bindings. This exists to allow
+ * clients that use it to check for SSLv2 support to keep functioning as
+ * expected.
+ */
static const long Cryptography_HAS_SSL2 = 0;
#ifdef OPENSSL_NO_SSL3_METHOD