View | Details | Raw Unified | Return to bug 254853 | Differences between
and this patch

Collapse All | Expand All

(-)b/security/py-cryptography-vectors/Makefile (-2 / +5 lines)
Lines 1-5 Link Here
1
PORTNAME=	cryptography-vectors
1
PORTNAME=	cryptography-vectors
2
PORTVERSION=	38.0.1
2
PORTVERSION=	41.0.3
3
CATEGORIES=	security python
3
CATEGORIES=	security python
4
MASTER_SITES=	PYPI
4
MASTER_SITES=	PYPI
5
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
5
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 14-21 LICENSE_COMB= dual Link Here
14
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
14
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
15
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD
15
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD
16
16
17
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
19
17
USES=		python
20
USES=		python
18
USE_PYTHON=	autoplist concurrent distutils
21
USE_PYTHON=	autoplist concurrent pep517
19
22
20
NO_ARCH=	yes
23
NO_ARCH=	yes
21
24
(-)b/security/py-cryptography-vectors/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1665073154
1
TIMESTAMP = 1693302794
2
SHA256 (cryptography_vectors-38.0.1.tar.gz) = 0431fd107c1fbad0377704a7051945b3b391169fddc4f6fa0bd4edc6b6e235dd
2
SHA256 (cryptography_vectors-41.0.3.tar.gz) = 80de0452c4b34f56f5518e81ebd75b6b905f5728aaed521d42e41f4ebc8a43fb
3
SIZE (cryptography_vectors-38.0.1.tar.gz) = 35273681
3
SIZE (cryptography_vectors-41.0.3.tar.gz) = 35287886
(-)b/security/py-cryptography/Makefile (-14 / +16 lines)
Lines 1-10 Link Here
1
PORTNAME=	cryptography
1
PORTNAME=	cryptography
2
PORTVERSION=	3.4.8
2
PORTVERSION=	41.0.3
3
PORTREVISION=	1
4
PORTEPOCH=	1
3
PORTEPOCH=	1
5
CATEGORIES=	security python
4
CATEGORIES=	security python
6
MASTER_SITES=	PYPI
5
MASTER_SITES=	PYPI
7
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
6
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
7
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
8
8
9
MAINTAINER=	sunpoet@FreeBSD.org
9
MAINTAINER=	sunpoet@FreeBSD.org
10
COMMENT=	Cryptographic recipes and primitives for Python developers
10
COMMENT=	Cryptographic recipes and primitives for Python developers
Lines 15-50 LICENSE_COMB= dual Link Here
15
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
15
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.APACHE
16
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD
16
LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD
17
17
18
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR}
18
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}setuptools>=40.6.0:devel/py-setuptools@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}setuptools-rust>=0.11.4:devel/py-setuptools-rust@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
19
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR}
22
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR}
20
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cryptography-vectors>=${PORTVERSION}:security/py-cryptography-vectors@${PY_FLAVOR} \
23
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cryptography-vectors>=${PORTVERSION}:security/py-cryptography-vectors@${PY_FLAVOR} \
21
		${PYTHON_PKGNAMEPREFIX}hypothesis>=1.11.4:devel/py-hypothesis@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}hypothesis>=1.11.4:devel/py-hypothesis@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}iso8601>=0:devel/py-iso8601@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}iso8601>=0:devel/py-iso8601@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}pretend>=0:devel/py-pretend@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}pretend>=0:devel/py-pretend@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}pytest-benchmark>=0:devel/py-pytest-benchmark@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}pytest-subtests>=0:devel/py-pytest-subtests@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}pytest-subtests>=0:devel/py-pytest-subtests@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0,1:devel/py-pytest-xdist@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0,1:devel/py-pytest-xdist@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}pytz>=0,1:devel/py-pytz@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}pytz>=0,1:devel/py-pytz@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR}
32
		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR}
29
33
30
USES=		compiler:env cpe python ssl
34
USES=		cargo compiler:env cpe python ssl
31
USE_PYTHON=	autoplist concurrent distutils pytest
35
USE_PYTHON=	autoplist concurrent pep517 pytest
36
37
CARGO_BUILD=	no
38
CARGO_CARGOTOML=${WRKSRC}/src/rust/Cargo.toml
39
CARGO_CARGOLOCK=${WRKSRC}/src/rust/Cargo.lock
40
CARGO_INSTALL=	no
41
CARGO_TEST=	no
32
42
33
CFLAGS+=	-I${OPENSSLINC}
43
CFLAGS+=	-I${OPENSSLINC}
34
LDFLAGS+=	-L${OPENSSLLIB}
44
LDFLAGS+=	-L${OPENSSLLIB}
35
MAKE_ENV=	CRYPTOGRAPHY_DONT_BUILD_RUST=1
36
TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
45
TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
37
46
38
CPE_VENDOR=	cryptography_project
47
CPE_VENDOR=	cryptography_project
39
48
40
.include <bsd.port.pre.mk>
41
42
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
43
post-patch:
44
	@${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' ${WRKSRC}/src/_cffi_src/build_openssl.py
45
.endif
46
47
post-install:
49
post-install:
48
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
50
	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
49
51
50
.include <bsd.port.post.mk>
52
.include <bsd.port.mk>
(-)b/security/py-cryptography/distinfo (-3 / +109 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1652122693
1
TIMESTAMP = 1693303063
2
SHA256 (cryptography-3.4.8.tar.gz) = 94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c
2
SHA256 (cryptography-41.0.3.tar.gz) = 6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34
3
SIZE (cryptography-3.4.8.tar.gz) = 546907
3
SIZE (cryptography-41.0.3.tar.gz) = 630139
4
SHA256 (rust/crates/Inflector-0.11.4.crate) = fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3
5
SIZE (rust/crates/Inflector-0.11.4.crate) = 17438
6
SHA256 (rust/crates/aliasable-0.1.3.crate) = 250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd
7
SIZE (rust/crates/aliasable-0.1.3.crate) = 6169
8
SHA256 (rust/crates/asn1-0.15.2.crate) = 28c19b9324de5b815b6487e0f8098312791b09de0dbf3d5c2db1fe2d95bab973
9
SIZE (rust/crates/asn1-0.15.2.crate) = 34002
10
SHA256 (rust/crates/asn1_derive-0.15.2.crate) = a045c3ccad89f244a86bd1e6cf1a7bf645296e7692698b056399b6efd4639407
11
SIZE (rust/crates/asn1_derive-0.15.2.crate) = 6096
12
SHA256 (rust/crates/autocfg-1.1.0.crate) = d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa
13
SIZE (rust/crates/autocfg-1.1.0.crate) = 13272
14
SHA256 (rust/crates/base64-0.13.1.crate) = 9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8
15
SIZE (rust/crates/base64-0.13.1.crate) = 61002
16
SHA256 (rust/crates/bitflags-1.3.2.crate) = bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a
17
SIZE (rust/crates/bitflags-1.3.2.crate) = 23021
18
SHA256 (rust/crates/cc-1.0.79.crate) = 50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f
19
SIZE (rust/crates/cc-1.0.79.crate) = 62624
20
SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
21
SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
22
SHA256 (rust/crates/foreign-types-0.3.2.crate) = f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1
23
SIZE (rust/crates/foreign-types-0.3.2.crate) = 7504
24
SHA256 (rust/crates/foreign-types-shared-0.1.1.crate) = 00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b
25
SIZE (rust/crates/foreign-types-shared-0.1.1.crate) = 5672
26
SHA256 (rust/crates/indoc-1.0.9.crate) = bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306
27
SIZE (rust/crates/indoc-1.0.9.crate) = 13475
28
SHA256 (rust/crates/libc-0.2.144.crate) = 2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1
29
SIZE (rust/crates/libc-0.2.144.crate) = 682092
30
SHA256 (rust/crates/lock_api-0.4.9.crate) = 435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df
31
SIZE (rust/crates/lock_api-0.4.9.crate) = 25685
32
SHA256 (rust/crates/memoffset-0.8.0.crate) = d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1
33
SIZE (rust/crates/memoffset-0.8.0.crate) = 8912
34
SHA256 (rust/crates/once_cell-1.17.2.crate) = 9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b
35
SIZE (rust/crates/once_cell-1.17.2.crate) = 33335
36
SHA256 (rust/crates/openssl-0.10.54.crate) = 69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019
37
SIZE (rust/crates/openssl-0.10.54.crate) = 258266
38
SHA256 (rust/crates/openssl-macros-0.1.1.crate) = a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c
39
SIZE (rust/crates/openssl-macros-0.1.1.crate) = 5601
40
SHA256 (rust/crates/openssl-sys-0.9.88.crate) = c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617
41
SIZE (rust/crates/openssl-sys-0.9.88.crate) = 66011
42
SHA256 (rust/crates/ouroboros-0.15.6.crate) = e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db
43
SIZE (rust/crates/ouroboros-0.15.6.crate) = 11257
44
SHA256 (rust/crates/ouroboros_macro-0.15.6.crate) = 5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7
45
SIZE (rust/crates/ouroboros_macro-0.15.6.crate) = 20751
46
SHA256 (rust/crates/parking_lot-0.12.1.crate) = 3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f
47
SIZE (rust/crates/parking_lot-0.12.1.crate) = 40967
48
SHA256 (rust/crates/parking_lot_core-0.9.7.crate) = 9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521
49
SIZE (rust/crates/parking_lot_core-0.9.7.crate) = 32412
50
SHA256 (rust/crates/pem-1.1.1.crate) = a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8
51
SIZE (rust/crates/pem-1.1.1.crate) = 11352
52
SHA256 (rust/crates/pkg-config-0.3.27.crate) = 26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964
53
SIZE (rust/crates/pkg-config-0.3.27.crate) = 18838
54
SHA256 (rust/crates/proc-macro-error-1.0.4.crate) = da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c
55
SIZE (rust/crates/proc-macro-error-1.0.4.crate) = 25293
56
SHA256 (rust/crates/proc-macro-error-attr-1.0.4.crate) = a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869
57
SIZE (rust/crates/proc-macro-error-attr-1.0.4.crate) = 7971
58
SHA256 (rust/crates/proc-macro2-1.0.64.crate) = 78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da
59
SIZE (rust/crates/proc-macro2-1.0.64.crate) = 44848
60
SHA256 (rust/crates/pyo3-0.18.3.crate) = e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109
61
SIZE (rust/crates/pyo3-0.18.3.crate) = 420236
62
SHA256 (rust/crates/pyo3-build-config-0.18.3.crate) = 9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3
63
SIZE (rust/crates/pyo3-build-config-0.18.3.crate) = 29137
64
SHA256 (rust/crates/pyo3-ffi-0.18.3.crate) = fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c
65
SIZE (rust/crates/pyo3-ffi-0.18.3.crate) = 64474
66
SHA256 (rust/crates/pyo3-macros-0.18.3.crate) = a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d
67
SIZE (rust/crates/pyo3-macros-0.18.3.crate) = 7175
68
SHA256 (rust/crates/pyo3-macros-backend-0.18.3.crate) = 97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918
69
SIZE (rust/crates/pyo3-macros-backend-0.18.3.crate) = 48922
70
SHA256 (rust/crates/quote-1.0.28.crate) = 1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488
71
SIZE (rust/crates/quote-1.0.28.crate) = 28382
72
SHA256 (rust/crates/redox_syscall-0.2.16.crate) = fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a
73
SIZE (rust/crates/redox_syscall-0.2.16.crate) = 24012
74
SHA256 (rust/crates/scopeguard-1.1.0.crate) = d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd
75
SIZE (rust/crates/scopeguard-1.1.0.crate) = 11470
76
SHA256 (rust/crates/smallvec-1.10.0.crate) = a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0
77
SIZE (rust/crates/smallvec-1.10.0.crate) = 31564
78
SHA256 (rust/crates/syn-1.0.109.crate) = 72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237
79
SIZE (rust/crates/syn-1.0.109.crate) = 237611
80
SHA256 (rust/crates/syn-2.0.18.crate) = 32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e
81
SIZE (rust/crates/syn-2.0.18.crate) = 240648
82
SHA256 (rust/crates/target-lexicon-0.12.7.crate) = fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5
83
SIZE (rust/crates/target-lexicon-0.12.7.crate) = 24402
84
SHA256 (rust/crates/unicode-ident-1.0.9.crate) = b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0
85
SIZE (rust/crates/unicode-ident-1.0.9.crate) = 41978
86
SHA256 (rust/crates/unindent-0.1.11.crate) = e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c
87
SIZE (rust/crates/unindent-0.1.11.crate) = 7700
88
SHA256 (rust/crates/vcpkg-0.2.15.crate) = accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426
89
SIZE (rust/crates/vcpkg-0.2.15.crate) = 228735
90
SHA256 (rust/crates/version_check-0.9.4.crate) = 49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f
91
SIZE (rust/crates/version_check-0.9.4.crate) = 14895
92
SHA256 (rust/crates/windows-sys-0.45.0.crate) = 75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0
93
SIZE (rust/crates/windows-sys-0.45.0.crate) = 2568659
94
SHA256 (rust/crates/windows-targets-0.42.2.crate) = 8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071
95
SIZE (rust/crates/windows-targets-0.42.2.crate) = 5492
96
SHA256 (rust/crates/windows_aarch64_gnullvm-0.42.2.crate) = 597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8
97
SIZE (rust/crates/windows_aarch64_gnullvm-0.42.2.crate) = 364071
98
SHA256 (rust/crates/windows_aarch64_msvc-0.42.2.crate) = e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43
99
SIZE (rust/crates/windows_aarch64_msvc-0.42.2.crate) = 666981
100
SHA256 (rust/crates/windows_i686_gnu-0.42.2.crate) = c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f
101
SIZE (rust/crates/windows_i686_gnu-0.42.2.crate) = 736236
102
SHA256 (rust/crates/windows_i686_msvc-0.42.2.crate) = 44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060
103
SIZE (rust/crates/windows_i686_msvc-0.42.2.crate) = 724951
104
SHA256 (rust/crates/windows_x86_64_gnu-0.42.2.crate) = 8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36
105
SIZE (rust/crates/windows_x86_64_gnu-0.42.2.crate) = 699373
106
SHA256 (rust/crates/windows_x86_64_gnullvm-0.42.2.crate) = 26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3
107
SIZE (rust/crates/windows_x86_64_gnullvm-0.42.2.crate) = 364068
108
SHA256 (rust/crates/windows_x86_64_msvc-0.42.2.crate) = 9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0
109
SIZE (rust/crates/windows_x86_64_msvc-0.42.2.crate) = 666936
(-)a/security/py-cryptography/files/patch-libressl (-316 lines)
Removed Link Here
1
--- src/_cffi_src/openssl/crypto.py.orig	2023-03-22 07:29:15 UTC
2
+++ src/_cffi_src/openssl/crypto.py
3
@@ -74,11 +74,8 @@ CUSTOMIZATIONS = """
4
 # define OPENSSL_DIR             SSLEAY_DIR
5
 #endif
6
 
7
+static const long Cryptography_HAS_OPENSSL_CLEANUP = 1;
8
 #if CRYPTOGRAPHY_IS_LIBRESSL
9
-static const long Cryptography_HAS_OPENSSL_CLEANUP = 0;
10
-
11
-void (*OPENSSL_cleanup)(void) = NULL;
12
-
13
 /* This function has a significantly different signature pre-1.1.0. since it is
14
  * for testing only, we don't bother to expose it on older OpenSSLs.
15
  */
16
@@ -89,7 +86,6 @@ int (*Cryptography_CRYPTO_set_mem_functions)(
17
     void (*)(void *, const char *, int)) = NULL;
18
 
19
 #else
20
-static const long Cryptography_HAS_OPENSSL_CLEANUP = 1;
21
 static const long Cryptography_HAS_MEM_FUNCTIONS = 1;
22
 
23
 int Cryptography_CRYPTO_set_mem_functions(
24
--- src/_cffi_src/openssl/cryptography.py.orig	2021-08-24 17:17:17 UTC
25
+++ src/_cffi_src/openssl/cryptography.py
26
@@ -33,17 +33,17 @@ INCLUDES = """
27
 #endif
28
 
29
 #define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \
30
-    (OPENSSL_VERSION_NUMBER >= 0x1010006f && !CRYPTOGRAPHY_IS_LIBRESSL)
31
+    OPENSSL_VERSION_NUMBER >= 0x1010006f
32
 
33
 #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110J \
34
-    (OPENSSL_VERSION_NUMBER < 0x101000af || CRYPTOGRAPHY_IS_LIBRESSL)
35
+    OPENSSL_VERSION_NUMBER < 0x101000af
36
 #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 \
37
-    (OPENSSL_VERSION_NUMBER < 0x10101000 || CRYPTOGRAPHY_IS_LIBRESSL)
38
+    OPENSSL_VERSION_NUMBER < 0x10101000
39
 #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_111B \
40
-    (OPENSSL_VERSION_NUMBER < 0x10101020 || CRYPTOGRAPHY_IS_LIBRESSL)
41
+    OPENSSL_VERSION_NUMBER < 0x10101020
42
 #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_111D \
43
-    (OPENSSL_VERSION_NUMBER < 0x10101040 || CRYPTOGRAPHY_IS_LIBRESSL)
44
-#if (CRYPTOGRAPHY_OPENSSL_LESS_THAN_111D && !CRYPTOGRAPHY_IS_LIBRESSL && \
45
+    OPENSSL_VERSION_NUMBER < 0x10101040
46
+#if (CRYPTOGRAPHY_OPENSSL_LESS_THAN_111D && \
47
     !defined(OPENSSL_NO_ENGINE)) || defined(USE_OSRANDOM_RNG_FOR_TESTING)
48
 #define CRYPTOGRAPHY_NEEDS_OSRANDOM_ENGINE 1
49
 #else
50
--- src/_cffi_src/openssl/dh.py.orig	2021-08-24 17:17:17 UTC
51
+++ src/_cffi_src/openssl/dh.py
52
@@ -37,117 +37,9 @@ int Cryptography_i2d_DHxparams_bio(BIO *bp, DH *x);
53
 """
54
 
55
 CUSTOMIZATIONS = """
56
-#if CRYPTOGRAPHY_IS_LIBRESSL
57
-#ifndef DH_CHECK_Q_NOT_PRIME
58
-#define DH_CHECK_Q_NOT_PRIME            0x10
59
-#endif
60
-
61
-#ifndef DH_CHECK_INVALID_Q_VALUE
62
-#define DH_CHECK_INVALID_Q_VALUE        0x20
63
-#endif
64
-
65
-#ifndef DH_CHECK_INVALID_J_VALUE
66
-#define DH_CHECK_INVALID_J_VALUE        0x40
67
-#endif
68
-
69
-/* DH_check implementation taken from OpenSSL 1.1.0pre6 */
70
-
71
-/*-
72
- * Check that p is a safe prime and
73
- * if g is 2, 3 or 5, check that it is a suitable generator
74
- * where
75
- * for 2, p mod 24 == 11
76
- * for 3, p mod 12 == 5
77
- * for 5, p mod 10 == 3 or 7
78
- * should hold.
79
- */
80
-
81
-int Cryptography_DH_check(const DH *dh, int *ret)
82
-{
83
-    int ok = 0, r;
84
-    BN_CTX *ctx = NULL;
85
-    BN_ULONG l;
86
-    BIGNUM *t1 = NULL, *t2 = NULL;
87
-
88
-    *ret = 0;
89
-    ctx = BN_CTX_new();
90
-    if (ctx == NULL)
91
-        goto err;
92
-    BN_CTX_start(ctx);
93
-    t1 = BN_CTX_get(ctx);
94
-    if (t1 == NULL)
95
-        goto err;
96
-    t2 = BN_CTX_get(ctx);
97
-    if (t2 == NULL)
98
-        goto err;
99
-
100
-    if (dh->q) {
101
-        if (BN_cmp(dh->g, BN_value_one()) <= 0)
102
-            *ret |= DH_NOT_SUITABLE_GENERATOR;
103
-        else if (BN_cmp(dh->g, dh->p) >= 0)
104
-            *ret |= DH_NOT_SUITABLE_GENERATOR;
105
-        else {
106
-            /* Check g^q == 1 mod p */
107
-            if (!BN_mod_exp(t1, dh->g, dh->q, dh->p, ctx))
108
-                goto err;
109
-            if (!BN_is_one(t1))
110
-                *ret |= DH_NOT_SUITABLE_GENERATOR;
111
-        }
112
-        r = BN_is_prime_ex(dh->q, BN_prime_checks, ctx, NULL);
113
-        if (r < 0)
114
-            goto err;
115
-        if (!r)
116
-            *ret |= DH_CHECK_Q_NOT_PRIME;
117
-        /* Check p == 1 mod q  i.e. q divides p - 1 */
118
-        if (!BN_div(t1, t2, dh->p, dh->q, ctx))
119
-            goto err;
120
-        if (!BN_is_one(t2))
121
-            *ret |= DH_CHECK_INVALID_Q_VALUE;
122
-        if (dh->j && BN_cmp(dh->j, t1))
123
-            *ret |= DH_CHECK_INVALID_J_VALUE;
124
-
125
-    } else if (BN_is_word(dh->g, DH_GENERATOR_2)) {
126
-        l = BN_mod_word(dh->p, 24);
127
-        if (l == (BN_ULONG)-1)
128
-            goto err;
129
-        if (l != 11)
130
-            *ret |= DH_NOT_SUITABLE_GENERATOR;
131
-    } else if (BN_is_word(dh->g, DH_GENERATOR_5)) {
132
-        l = BN_mod_word(dh->p, 10);
133
-        if (l == (BN_ULONG)-1)
134
-            goto err;
135
-        if ((l != 3) && (l != 7))
136
-            *ret |= DH_NOT_SUITABLE_GENERATOR;
137
-    } else
138
-        *ret |= DH_UNABLE_TO_CHECK_GENERATOR;
139
-
140
-    r = BN_is_prime_ex(dh->p, BN_prime_checks, ctx, NULL);
141
-    if (r < 0)
142
-        goto err;
143
-    if (!r)
144
-        *ret |= DH_CHECK_P_NOT_PRIME;
145
-    else if (!dh->q) {
146
-        if (!BN_rshift1(t1, dh->p))
147
-            goto err;
148
-        r = BN_is_prime_ex(t1, BN_prime_checks, ctx, NULL);
149
-        if (r < 0)
150
-            goto err;
151
-        if (!r)
152
-            *ret |= DH_CHECK_P_NOT_SAFE_PRIME;
153
-    }
154
-    ok = 1;
155
- err:
156
-    if (ctx != NULL) {
157
-        BN_CTX_end(ctx);
158
-        BN_CTX_free(ctx);
159
-    }
160
-    return (ok);
161
-}
162
-#else
163
 int Cryptography_DH_check(const DH *dh, int *ret) {
164
     return DH_check(dh, ret);
165
 }
166
-#endif
167
 
168
 /* These functions were added in OpenSSL 1.1.0f commit d0c50e80a8 */
169
 /* Define our own to simplify support across all versions. */
170
--- src/_cffi_src/openssl/fips.py.orig	2021-08-24 17:17:17 UTC
171
+++ src/_cffi_src/openssl/fips.py
172
@@ -17,11 +17,5 @@ int FIPS_mode(void);
173
 """
174
 
175
 CUSTOMIZATIONS = """
176
-#if CRYPTOGRAPHY_IS_LIBRESSL
177
-static const long Cryptography_HAS_FIPS = 0;
178
-int (*FIPS_mode_set)(int) = NULL;
179
-int (*FIPS_mode)(void) = NULL;
180
-#else
181
 static const long Cryptography_HAS_FIPS = 1;
182
-#endif
183
 """
184
--- src/_cffi_src/openssl/ocsp.py.orig	2021-08-24 17:17:17 UTC
185
+++ src/_cffi_src/openssl/ocsp.py
186
@@ -77,7 +77,6 @@ int i2d_OCSP_RESPDATA(OCSP_RESPDATA *, unsigned char *
187
 
188
 CUSTOMIZATIONS = """
189
 #if ( \
190
-    !CRYPTOGRAPHY_IS_LIBRESSL && \
191
     CRYPTOGRAPHY_OPENSSL_LESS_THAN_110J \
192
     )
193
 /* These structs come from ocsp_lcl.h and are needed to de-opaque the struct
194
@@ -104,62 +103,15 @@ struct ocsp_basic_response_st {
195
 };
196
 #endif
197
 
198
-#if CRYPTOGRAPHY_IS_LIBRESSL
199
-/* These functions are all taken from ocsp_cl.c in OpenSSL 1.1.0 */
200
-const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *single)
201
-{
202
-    return single->certId;
203
-}
204
-const Cryptography_STACK_OF_X509 *OCSP_resp_get0_certs(
205
-    const OCSP_BASICRESP *bs)
206
-{
207
-    return bs->certs;
208
-}
209
-int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
210
-                      const ASN1_OCTET_STRING **pid,
211
-                      const X509_NAME **pname)
212
-{
213
-    const OCSP_RESPID *rid = bs->tbsResponseData->responderId;
214
-
215
-    if (rid->type == V_OCSP_RESPID_NAME) {
216
-        *pname = rid->value.byName;
217
-        *pid = NULL;
218
-    } else if (rid->type == V_OCSP_RESPID_KEY) {
219
-        *pid = rid->value.byKey;
220
-        *pname = NULL;
221
-    } else {
222
-        return 0;
223
-    }
224
-    return 1;
225
-}
226
-const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(
227
-    const OCSP_BASICRESP* bs)
228
-{
229
-    return bs->tbsResponseData->producedAt;
230
-}
231
-const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs)
232
-{
233
-    return bs->signature;
234
-}
235
-#endif
236
-
237
 #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110J
238
 const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs)
239
 {
240
-#if CRYPTOGRAPHY_IS_LIBRESSL
241
-    return bs->signatureAlgorithm;
242
-#else
243
     return &bs->signatureAlgorithm;
244
-#endif
245
 }
246
 
247
 const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs)
248
 {
249
-#if CRYPTOGRAPHY_IS_LIBRESSL
250
-    return bs->tbsResponseData;
251
-#else
252
     return &bs->tbsResponseData;
253
-#endif
254
 }
255
 #endif
256
 """
257
--- src/_cffi_src/openssl/ssl.py.orig	2021-08-24 17:17:17 UTC
258
+++ src/_cffi_src/openssl/ssl.py
259
@@ -515,12 +515,7 @@ CUSTOMIZATIONS = """
260
 // users have upgraded. PersistentlyDeprecated2020
261
 static const long Cryptography_HAS_TLSEXT_HOSTNAME = 1;
262
 
263
-#if CRYPTOGRAPHY_IS_LIBRESSL
264
-static const long Cryptography_HAS_VERIFIED_CHAIN = 0;
265
-Cryptography_STACK_OF_X509 *(*SSL_get0_verified_chain)(const SSL *) = NULL;
266
-#else
267
 static const long Cryptography_HAS_VERIFIED_CHAIN = 1;
268
-#endif
269
 
270
 #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111
271
 static const long Cryptography_HAS_KEYLOG = 0;
272
@@ -586,8 +581,6 @@ static const long TLS_ST_OK = 0;
273
 #endif
274
 
275
 #if CRYPTOGRAPHY_IS_LIBRESSL
276
-static const long SSL_OP_NO_DTLSv1 = 0;
277
-static const long SSL_OP_NO_DTLSv1_2 = 0;
278
 long (*DTLS_set_link_mtu)(SSL *, long) = NULL;
279
 long (*DTLS_get_link_min_mtu)(SSL *) = NULL;
280
 #endif
281
--- src/_cffi_src/openssl/x509.py.orig	2021-08-24 17:02:37 UTC
282
+++ src/_cffi_src/openssl/x509.py
283
@@ -276,33 +276,8 @@ void X509_REQ_get0_signature(const X509_REQ *, const A
284
 """
285
 
286
 CUSTOMIZATIONS = """
287
-#if CRYPTOGRAPHY_IS_LIBRESSL
288
-int i2d_re_X509_tbs(X509 *x, unsigned char **pp)
289
-{
290
-    /* in 1.0.2+ this function also sets x->cert_info->enc.modified = 1
291
-       but older OpenSSLs don't have the enc ASN1_ENCODING member in the
292
-       X509 struct.  Setting modified to 1 marks the encoding
293
-       (x->cert_info->enc.enc) as invalid, but since the entire struct isn't
294
-       present we don't care. */
295
-    return i2d_X509_CINF(x->cert_info, pp);
296
-}
297
-#endif
298
-
299
 /* Being kept around for pyOpenSSL */
300
 X509_REVOKED *Cryptography_X509_REVOKED_dup(X509_REVOKED *rev) {
301
     return X509_REVOKED_dup(rev);
302
 }
303
-/* Added in 1.1.0 but we need it in all versions now due to the great
304
-   opaquing. */
305
-#if CRYPTOGRAPHY_IS_LIBRESSL
306
-int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp)
307
-{
308
-    req->req_info->enc.modified = 1;
309
-    return i2d_X509_REQ_INFO(req->req_info, pp);
310
-}
311
-int i2d_re_X509_CRL_tbs(X509_CRL *crl, unsigned char **pp) {
312
-    crl->crl->enc.modified = 1;
313
-    return i2d_X509_CRL_INFO(crl->crl, pp);
314
-}
315
-#endif
316
 """
(-)a/security/py-cryptography/files/patch-setup.py (-55 lines)
Removed Link Here
1
--- setup.py.orig	2021-03-25 17:19:57 UTC
2
+++ setup.py
3
@@ -10,23 +10,7 @@ import sys
4
 
5
 from setuptools import find_packages, setup
6
 
7
-try:
8
-    from setuptools_rust import RustExtension
9
-except ImportError:
10
-    print(
11
-        """
12
-        =============================DEBUG ASSISTANCE==========================
13
-        If you are seeing an error here please try the following to
14
-        successfully install cryptography:
15
 
16
-        Upgrade to the latest pip and try again. This will fix errors for most
17
-        users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
18
-        =============================DEBUG ASSISTANCE==========================
19
-        """
20
-    )
21
-    raise
22
-
23
-
24
 base_dir = os.path.dirname(__file__)
25
 src_dir = os.path.join(base_dir, "src")
26
 
27
@@ -41,9 +25,8 @@ with open(os.path.join(src_dir, "cryptography", "__abo
28
 
29
 # `install_requirements` and `setup_requirements` must be kept in sync with
30
 # `pyproject.toml`
31
-setuptools_rust = "setuptools-rust>=0.11.4"
32
 install_requirements = ["cffi>=1.12"]
33
-setup_requirements = install_requirements + [setuptools_rust]
34
+setup_requirements = install_requirements
35
 
36
 if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"):
37
     rust_extensions = []
38
@@ -129,9 +112,6 @@ try:
39
                 "twine >= 1.12.0",
40
                 "sphinxcontrib-spelling >= 4.0.1",
41
             ],
42
-            "sdist": [
43
-                setuptools_rust,
44
-            ],
45
             "pep8test": [
46
                 "black",
47
                 "flake8",
48
@@ -149,7 +129,6 @@ try:
49
             "src/_cffi_src/build_openssl.py:ffi",
50
             "src/_cffi_src/build_padding.py:ffi",
51
         ],
52
-        rust_extensions=rust_extensions,
53
     )
54
 except:  # noqa: E722
55
     # Note: This is a bare exception that re-raises so that we don't interfere
(-)b/security/py-openssl/Makefile (-19 / +7 lines)
Lines 1-5 Link Here
1
PORTNAME=	openssl
1
PORTNAME=	openssl
2
DISTVERSION=	21.0.0
2
DISTVERSION=	23.2.0
3
PORTEPOCH=	1
3
PORTEPOCH=	1
4
CATEGORIES=	security python
4
CATEGORIES=	security python
5
MASTER_SITES=	PYPI
5
MASTER_SITES=	PYPI
Lines 13-38 WWW= https://github.com/pyca/pyopenssl Link Here
13
LICENSE=	APACHE20
13
LICENSE=	APACHE20
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
15
16
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}six>=1.5.2:devel/py-six@${PY_FLAVOR}
17
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=3.0.1:devel/py-pytest@${PY_FLAVOR} \
16
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=3.0.1:devel/py-pytest@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}flaky>0:devel/py-flaky@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}flaky>0:devel/py-flaky@${PY_FLAVOR} \
19
		${PYTHON_PKGNAMEPREFIX}pretend>0:devel/py-pretend@${PY_FLAVOR} \
18
		${PYTHON_PKGNAMEPREFIX}pretend>0:devel/py-pretend@${PY_FLAVOR} \
20
		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
19
		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
21
20
22
USES=		cpe python pycryptography:run
21
USES=		cpe python pycryptography:run
23
USE_PYTHON=	autoplist concurrent distutils pythonprefix
22
USE_PYTHON=	autoplist concurrent distutils pytest pythonprefix
24
23
25
NO_ARCH=	yes
24
NO_ARCH=	yes
26
27
CPE_VENDOR=	jean-paul_calderone
28
CPE_PRODUCT=	py${PORTNAME}
29
30
# Use options.mk to use OSVERSION and handle redefine PORTEPOCH
31
.include <bsd.port.options.mk>
32
33
# We need to keep old py-cryptography and py-penssl for 11.x release
34
# due to outdated OpenSSL version in base
35
36
# These tests will be skipped due the following reasons:
25
# These tests will be skipped due the following reasons:
37
#
26
#
38
# * test_connect_refused: Avoid stalling in build environments that don't have
27
# * test_connect_refused: Avoid stalling in build environments that don't have
Lines 42-52 CPE_PRODUCT= py${PORTNAME} Link Here
42
#
31
#
43
# The system clock must be in sync otherwise the test "test_verify_with_time"
32
# The system clock must be in sync otherwise the test "test_verify_with_time"
44
# will fail.
33
# will fail.
45
do-test:
34
PYTEST_IGNORED_TESTS=	test_connect_refused test_set_verify_callback_exception
46
	@cd ${WRKSRC} && ${SET_ENV} LC_ALL=en_US.UTF-8 ${TEST_ENV} \
35
TEST_ENV=	LC_ALL=en_US.UTF-8 PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
47
			PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
36
48
			${PYTHON_CMD} -m pytest -rs -v -k \
37
CPE_VENDOR=	jean-paul_calderone
49
			'not test_connect_refused and \
38
CPE_PRODUCT=	py${PORTNAME}
50
		       	not test_set_verify_callback_exception'
51
39
52
.include <bsd.port.mk>
40
.include <bsd.port.mk>
(-)b/security/py-openssl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1673046083
1
TIMESTAMP = 1691096194
2
SHA256 (pyOpenSSL-21.0.0.tar.gz) = 5e2d8c5e46d0d865ae933bef5230090bdaf5506281e9eec60fa250ee80600cb3
2
SHA256 (pyOpenSSL-23.2.0.tar.gz) = 276f931f55a452e7dea69c7173e984eb2a4407ce413c918aa34b55f82f9b8bac
3
SIZE (pyOpenSSL-21.0.0.tar.gz) = 175652
3
SIZE (pyOpenSSL-23.2.0.tar.gz) = 185132

Return to bug 254853