Skip to contentSkip to conversation

package/python-cryptography: bump to version 42.0.2

PATCH In review James Hilliard 2 participants 2 messages Feb 12, 2024 – Mar 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-cryptography: bump to version 42.0.2

License hash changed due to dropping PSF license:
https://github.com/pyca/cryptography/commit/5e6476a4c6e094926a983dcf5cbe9488c30aeb53

We now need to enable chacha support when building with libopenssl.

---
 package/python-cryptography/Config.in                | 1 +
 package/python-cryptography/python-cryptography.hash | 4 ++--
 package/python-cryptography/python-cryptography.mk   | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)
package/python-cryptography/Config.in +1 -0
index 213aa24fa8..d12f040656 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PYTHON_CRYPTOGRAPHY
 	bool "python-cryptography"
 	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
 	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA if BR2_PACKAGE_LIBOPENSSL
 	select BR2_PACKAGE_PYTHON_CFFI # runtime
 	help
 	  cryptography is a package designed to expose cryptographic
package/python-cryptography/python-cryptography.hash +2 -2
index e083014750..43c458e274 100644
@@ -1,6 +1,6 @@
 # Locally calculated after vendoring
-sha256  405c9a6271e1a088ea0b432bc2094e2e8baadb2241e192ce9c73a7cc9793b127  cryptography-39.0.2.tar.gz
+sha256  44b00c8a646aeb0d2de5a385364115d1bd170880964c4844a7b568523f82bb61  cryptography-42.0.2.tar.gz
 # Locally computed sha256 checksums
-sha256  43dad2cc752ab721cd9a9f36ece70fb53ab7713551f2d3d8694d8e8c5a06d6e2  LICENSE
+sha256  3e0c7c091a948b82533ba98fd7cbb40432d6f1a9acbf85f5922d2f99a93ae6bb  LICENSE
 sha256  aac73b3148f6d1d7111dbca32099f68d26c644c6813ae1e4f05f6579aa2663fe  LICENSE.APACHE
 sha256  602c4c7482de6479dd2e9793cda275e5e63d773dacd1eca689232ab7008fb4fb  LICENSE.BSD
package/python-cryptography/python-cryptography.mk +2 -2
index 07c88ec3da..9e052f6376 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-PYTHON_CRYPTOGRAPHY_VERSION = 39.0.2
+PYTHON_CRYPTOGRAPHY_VERSION = 42.0.2
 PYTHON_CRYPTOGRAPHY_SOURCE = cryptography-$(PYTHON_CRYPTOGRAPHY_VERSION).tar.gz
-PYTHON_CRYPTOGRAPHY_SITE = https://files.pythonhosted.org/packages/fa/f3/f4b8c175ea9a1de650b0085858059050b7953a93d66c97ed89b93b232996
+PYTHON_CRYPTOGRAPHY_SITE = https://files.pythonhosted.org/packages/0f/6f/40f1b5c6bafc809dd21a9e577458ecc1d8062a7e10148d140f402b535eaa
 PYTHON_CRYPTOGRAPHY_SETUP_TYPE = setuptools-rust
 PYTHON_CRYPTOGRAPHY_LICENSE = Apache-2.0 or BSD-3-Clause
 PYTHON_CRYPTOGRAPHY_LICENSE_FILES = LICENSE LICENSE.APACHE LICENSE.BSD
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello,

Quoted 6 lines · James Hilliard

License hash changed due to dropping PSF license:
https://github.com/pyca/cryptography/commit/5e6476a4c6e094926a983dcf5cbe9488c30aeb53

We now need to enable chacha support when building with libopenssl.

I am not sure whether this patch is the result of general buildroot maintenance or if it aims to solve a specific issue, but I found it while searching to solve some runtime failure with an image based on branch 2024.02.x. I have a custom script executing the following call:

cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM,
cert_bytes)
which fails with the following exception:

File "/usr/lib/python3.11/site-packages/OpenSSL/crypto.py", line 1327, in
get_signature_algorithm
AttributeError: module 'lib' has no attribute 'X509_ALGOR_get0'

This error is due to package python-pyopenssl expecting package python-cryptography with version at least 41.0.5
(https://github.com/pyca/cryptography/pull/9740/files).

So I confirm that pulling this patch on top of 2024.02.x fixed my issue :)

Signature · 8 lines
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot