View | Details | Raw Unified | Return to bug 238968
Collapse All | Expand All

(-)security/py-cryptography/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	cryptography
4
PORTNAME=	cryptography
5
PORTVERSION=	2.6.1
5
PORTVERSION=	2.7
6
CATEGORIES=	security python
6
CATEGORIES=	security python
7
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
(-)security/py-cryptography/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1551354433
1
TIMESTAMP = 1561841310
2
SHA256 (cryptography-2.6.1.tar.gz) = 26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6
2
SHA256 (cryptography-2.7.tar.gz) = e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6
3
SIZE (cryptography-2.6.1.tar.gz) = 491580
3
SIZE (cryptography-2.7.tar.gz) = 495877
(-)security/py-cryptography/files/patch-PR4855 (-49 lines)
Lines 1-49 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;

Return to bug 238968