Removed
Link Here
|
1 |
# security/py-cryptography fails to build with libressl-2.9.1 |
2 |
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237487 |
3 |
# Use generic DTLS functions added in LibreSSL 2.9.1 |
4 |
# https://github.com/pyca/cryptography/pull/4855 |
5 |
|
6 |
index 4124dcb879..ac32fdffde 100644 |
7 |
--- src/_cffi_src/openssl/cryptography.py.orig |
8 |
+++ src/_cffi_src/openssl/cryptography.py |
9 |
@@ -38,9 +38,12 @@ |
10 |
(LIBRESSL_VERSION_NUMBER >= 0x2070000f) |
11 |
#define CRYPTOGRAPHY_LIBRESSL_28_OR_GREATER \ |
12 |
(LIBRESSL_VERSION_NUMBER >= 0x2080000f) |
13 |
+#define CRYPTOGRAPHY_LIBRESSL_291_OR_GREATER \ |
14 |
+ (LIBRESSL_VERSION_NUMBER >= 0x2090100f) |
15 |
#else |
16 |
#define CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER (0) |
17 |
#define CRYPTOGRAPHY_LIBRESSL_28_OR_GREATER (0) |
18 |
+#define CRYPTOGRAPHY_LIBRESSL_291_OR_GREATER (0) |
19 |
#endif |
20 |
|
21 |
#define CRYPTOGRAPHY_OPENSSL_102_OR_GREATER \ |
22 |
diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py |
23 |
index 92fd1e3ec8..da21f3ce90 100644 |
24 |
--- src/_cffi_src/openssl/ssl.py.orig |
25 |
+++ src/_cffi_src/openssl/ssl.py |
26 |
@@ -719,17 +719,20 @@ |
27 |
static const long TLS_ST_OK = 0; |
28 |
#endif |
29 |
|
30 |
-#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 |
31 |
+/* LibreSSL 2.9.1 added only the DTLS_*_method functions */ |
32 |
+#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_291_OR_GREATER |
33 |
static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0; |
34 |
const SSL_METHOD *(*DTLS_method)(void) = NULL; |
35 |
const SSL_METHOD *(*DTLS_server_method)(void) = NULL; |
36 |
const SSL_METHOD *(*DTLS_client_method)(void) = NULL; |
37 |
+#else |
38 |
+static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1; |
39 |
+#endif |
40 |
+#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 |
41 |
static const long SSL_OP_NO_DTLSv1 = 0; |
42 |
static const long SSL_OP_NO_DTLSv1_2 = 0; |
43 |
long (*DTLS_set_link_mtu)(SSL *, long) = NULL; |
44 |
long (*DTLS_get_link_min_mtu)(SSL *) = NULL; |
45 |
-#else |
46 |
-static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 1; |
47 |
#endif |
48 |
|
49 |
static const long Cryptography_HAS_DTLS = 1; |
50 |
- |